cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
borhunt
Level 3

During major upgrade InstallValidate terminates with File In Use

I have an Basic MSI project in 2011.

I install a service using InstallScript calling SC.EXE using LaunchAppAndWait.

This is the only way I have been successful in getting my service to Start, Stop, and get removed without problems.

This works fine on new installations and uninstallations. The Unistall actually prompt the user to stop the thread. I would like it to just automatically stop the thread. Ideas here ?

But during an Upgrade, when InstallValidate runs, I get the following errors in the log file and the installation terminates.

MSI (s) (30:10) [15:20:53:671]: RESTART MANAGER: Detected that application with id 916, friendly name 'ScsiAssist', service short name 'ScsiAssist', of type RmService and status 1 holds file in use.
MSI (c) (CC:3C) [15:20:53:687]: RESTART MANAGER: Session opened.
MSI (c) (CC:3C) [15:20:53:687]: RESTART MANAGER: Detected that application with id 916, friendly name 'ScsiAssist', service short name 'ScsiAssist', of type RmService and status 1 holds file in use.
Action ended 15:20:53: InstallValidate. Return value 3.
Action ended 15:20:53: INSTALL. Return value 3.

I cannot stop the service because it requires I run the CA in Deferred mode which cannot be run until after InstallValidate. Chicken and the Egg problem.

This EXE for this service is installed as a component.

Any ideas ?
Labels (1)
0 Kudos
(1) Reply
Kelter
Level 10

we have the same issue. i literally had to write an app that stops our services, and embed a manifest to require elevation. this isn't quite as ugly as you might think, and here's why: during an initial installation, the setup.exe elevates privs. during a removal of the product, the setup runs elevated as well (as long as the user hit Remove" from "Programs And Features" and not "Modify". it's only during a "modify" or repair operation that the setup is not elevated. (I'm assuming that you've made your setup.exe require admin privs.) during a modify or repair operation, the user gets a little UAC prompt requesting elevation.

i, too, would like a better mechanism. actually, i would like MSI to support installation of kernel driver service types so we wouldn't have to throw a prompt and stuff. i will never understand that decision.

if anybody has a better idea, please speak up!
0 Kudos