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!

Voxtron
Posts: 4
Joined: Wed Jun 25, 2014 8:08 am

Conditionally remove service

Hey all,

we are building an installer which sets up two IIS-pages, a database and registers a windows service.
When uninstalling our software, the user should be able to select the components to get removed.

This is working in general, but we came across a problem when choosing not to remove the service:
It stays in the services list (services.msc), but gets stopped and removed from the harddrive.

We have set a condition for DeleteServices inside the InstallExecuteSequence-Table and for removing the service-directory (under Files and Folders).

Thank you in advance for your help,

David (Voxtron)
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Conditionally remove service

Hi David,

In order to keep your service file on the machine during the uninstallation, you should set the "Permanent" flag for its related component in the "Organization" page. To find its component, you can simply select the file in the "Files and Folders" page, then press the "F8" keyboard button.

When the "Permanent" flag is set for a file, it will not be removed from the machine during the uninstall. If you want to remove that file conditionally, you can create a File Removal operation for it and set the appropriate condition for it.

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
Voxtron
Posts: 4
Joined: Wed Jun 25, 2014 8:08 am

Re: Conditionally remove service

Hey Eusebiu,

now we have set the "Permanent"- flag for every file which belongs to the service. To be able to remove it when we want to do this, we set the removal in the properties-dialog under "Files and Folders".
When uninstalling our application now, the service wont get removed anymore, no matter whether we choose to do so or not.

We had a look into the logs after testing your solution and found that the property used in our condition is set to the right value, so everything should be fine. Where could be conflicts preventing us from deleting the files?

Thanks for your help,

David (Voxtron)
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: Conditionally remove service

Hi David,

I'm not sure why you encounter this behavior. Can you please send us the .AIP (project file) and a verbose log of the installation to support at advancedinstaller dot com, so we can investigate them?

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

Return to “Building Installers”