Windows Service issues on Upgrade - Advanced Installer Community

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!

davidhomer
Posts: 38
Joined: Fri Oct 23, 2009 2:39 pm

Windows Service issues on Upgrade

Hello,

I have a sample application that installs a Windows Service. Upgrade mode is "Automatically upgrade older product versions" and order can be either Uninstall old first or Install new version first for this problem to happen.

I configure Services to Install and leave the default Control operation to Start Service on Install and Stop and Delete on uninstall.

I install the Windows Service 1.0.0 - the serice is installed and starts correctly.

I upgrade the version of the Windows Service to 1.1.0 and the Advanced Installer to 1.1.0 and generate a new product code when prompted.

When I install (upgrade to) version 1.1.0 I get a "Files in use dialgo" The following applications are using files that need to be updated by this setup:
Example Service.

Why am I getting this - surely the installer should stop the Windows Service before attempting to update its files?


Thanks,


Dave
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Windows Service issues on Upgrade

Hello,

Please send a screenshot with the "Files in Use" dialog, your .aip project file and an install log of the version 1.1.0 installation to support at advancedinstaller dot com.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
davidhomer
Posts: 38
Joined: Fri Oct 23, 2009 2:39 pm

Re: Windows Service issues on Upgrade

OK I have posted these through to you


Thanks


Dave
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: Windows Service issues on Upgrade

Hello,

I studied your project. It appears you have two executables there. The "vshost" one failed to act as a service. The other one acted properly as a service, and uninstalled successfully when installing the new version of your product (without the "Files in use dialog" popping up). Does your service have an interface? Note that only windows with a title bar are displayed by the "files in use dialog". If your service does not own such window, then another problem is responsible for that dialog popping up.

You can check what process is running in Windows Task Manager to see which one is responsible for the "files in use" message.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
davidhomer
Posts: 38
Joined: Fri Oct 23, 2009 2:39 pm

Re: Windows Service issues on Upgrade

Got it! Obvious really now I see whats happening :-)

If you are using the Install first then Uninstall method of upgrade you just need to tick the "Stop" command in the Service control operation to stop the service on install - therefore you get

Stop Service
Copy Files
Install service (doesnt really do anything on upgrade)
Start Service
Uninstall (doesn't actually remove the service as the setup knows that the service is still required).


Thanks,


Dave

Return to “Common Problems”