Reputation: 254
I have a Windows service app in C# and a setup project for installing the service. In the setup project, RemovePreviousVersion is set to true, and the custom actions are all set.
I upgrade the app by running the msi file which will have a higher version number than the installed version. While running the msi, I get a prompt saying the file is in use and asking me to Try Again, Continue or Exit. If I select Continue, the installation will go on happily and ask to restart at the end. This is all fine and expected.
However, I need to do the upgrade unattended by running the msi with msiexec using the /quiet option, which will fail and according to the log, the problem is due to file in use.
How can I install a msi unattended using msiexec if a file is in use? I am looking for a way of getting msiexec to work unattended rather than doing all the work myself stopping my service, etc.
Upvotes: 0
Views: 352
Reputation: 5179
Try your re-installation after stopping the previous running service.
control panel->Administrative tools->services
select your service from the opened service listing window and stop your service.
Hope this solves your problem.
Upvotes: 0