We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Nuno_147
Posts: 3
Joined: Tue Jan 20, 2015 2:04 pm

Sequence service stop/start and file removal

I am testing your product for use in a project I am working on.

One of the sequences in the install/uninstall operations are :

Stop an existing service [a],
Stop another existing service
copy files.
Regsrv one the copied files
Start second service
Start first service [a]

Same goes in unstalled, however instead of copy file, we delete the files and unregister

is it possible to make such a sequence. I have been looking and couldn't find a way to make sure about the sequence (stopping service a/b, copy files etc)

Can you explain how this can be accomplished ?
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Sequence service stop/start and file removal

Hi and welcome to Advanced Installer forums.

Thank you for your interest in Advanced Installer.

In order to achieve what you want you can follow the steps below:
- create a BAT file that stops the services you need. For instance:
  • sc stop A
    sc stop B
- go in the "Files and Folders" page and add that file as a temporary file using the "Temporary Files" toolbar button
- go in the "Custom Action" page and add a "Launch file" custom action after the "Install Execution Stage -> Paths Resolution" action group
- right-click in the "File to launch" field, select "File..." and choose your BAT file from the dialog that appears
- go in the "Files and Folders" page and add the files that you want to copy
- go to their properties dialog and in the "Registration" tab select the "Auto register file" option, then the "Extract registration info from native library" option with synchronization set to "Enabled"
- go in the "Services" page and add a new "Control Operation" for each service
- write the name each service in the "Service name" field, then check only the "On Install: Start" and "On Uninstall: Start" options
- build and run the project

Let us know if this helped, otherwise give us more details about your scenario.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”