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

InstallScript MSI - Minor Upgrade - stop/start service?

In an InstallScript MSI project what functions can be overridden to customize a minor upgrade behavior? OnPatchUIBefore/After don't seem to be getting called, or OnMaintUIBefore/After.

In a pure InstallScript project there's OnUpdateUIBefore/After but I can't seem to find something similar in this InstallScript MSI project.

The upgrade is replacing a bunch of config files ok but its not replacing an .exe since the service is still running and has the file locked.

Thanks!
Labels (1)
0 Kudos
(3) Replies
Christopher_Pai
Level 16

Are you using the service control / service install tables? If so, and if you set the right flags ( install: stop, start, delete, create and uninstall: stop, delete ) then the upgrade should take care of the service because the component is being (re)installed.
0 Kudos
joshstechnij
Level 10 Flexeran
Level 10 Flexeran

InstallScript MSI projects run the OnResumeUIBefore/After events on minor upgrades. OnPatchUIBefore/After are run during a patch installation. The OnUpdateUIBefore/After events are not available in InstallScript MSI projects.
0 Kudos
Smatchimo
Level 3

Ahhhh, I didn't notice I was getting a "Val0010" warning. The .exe keyfile that needed updated was still set to the same version as the old .exe, even though it had changed. After setting proper file version numbers on both my little test upgrade works fine now with one small exception.

Even though it replaces the .exe and stops/starts the service just fine, it's still prompting for a reboot for some odd reason, so I just commented out the "if ( BATCH_INSTALL ) then SdFinishReboot" lines and only left SdFinish in OnResumeUIAfter for now.
0 Kudos