custom action - Stop windows service before perform the uninstallation -
i have installer installs few components including windows service, after installed it'll start service installed onto system using customaction.
the problem when uninstall application, installer asks close application before continue.
i created custom action stop service, , scheduled uninstall actions.
but not executed until press ok error dialog after manually stop service.
it failed on win7, tested same msi on winxp , worked fine (the custom action executed before checking file in-use)!!!
i'm using vs2010 setup project create installer, don't have problem modify (using orca example) after build.
here content of installexecutesequence table :
i found installvalidate action check in-use files, can't sequence custom action stop service before because before installinitialize action require custom actions after (ice77 evaluator)
ice77 posts error if in-script custom action sequenced before installinitialize action or after installfinalize action.
what should do, shall use msirestartmanagercontrol property specifies whether windows installer package uses filesinuse dialog functionality, need notify user other in-use files.
there built-in features in windows installer - no custom action necessary. in fact advice against using custom action unless service special (for example, slow stop, or in need of shutting down lot of resources , need verify so). normal services stop within half minute or so. not sure how long windows installer engine configured wait service stop.
the servicecontrol table of msi "under hood" feature this. installation tools provide wizard or gui elements control in simpler fashion though.
here service control view in 1 installshield version: