In my case the service in question is one created and destroyed by a sql notification services 2005 "nscontrol.exe" command processing so my wix "Service1" component sources takes care of putting the necessary files in place and a set of related custom actions that use the sqlns05 "nscontrol.exe" utility take care of creating/destroying the service (see related excerpts below). Is it possible to include the ServiceControl statement in my "Service1" component and condition it to do an stop prior to files being processed during (UPGRADINGPRODUCTCODE Or PATCH) activities and then started after the (UPGRADINGPRODUCTCODE Or PATCH) activities complete?
<Component Id="Service1" Guid="B9CD4A81-9755-42F5-BB25-CC8879B38C2B" Win64="$(var.Win64)"> <!-- using a custom action instead to control timing of when this setting gets applied --> <!--<util:ServiceConfig ServiceName="NS$EventingMSSolveInstance" FirstFailureActionType="restart" SecondFailureActionType="restart" ThirdFailureActionType="restart" />--> </Component <CustomAction Id="QtExecCmdLineSet4" Property="QtExecCmdLineRun4" Value=""[SQLNSBINDIR]nscontrol.exe" register -name EventingMSSolveInstance -server [DATABASESHOST] -service -serviceusername "NT AUTHORITY\Network Service"" /> <CustomAction Id="QtExecCmdLineRun4" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" /> <CustomAction Id="QtExecCmdLineSet5" Property="QtExecCmdLineRun5" Value=""[$(var.SystemFolder)]cmd.exe" /c copy "[SQLNSBINDIR]NsService.exe" "[Service1Dir]"" /> <CustomAction Id="QtExecCmdLineRun5" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" /> <CustomAction Id="QtExecCmdLineSet6" Property="QtExecCmdLineRun6" Value=""[$(var.SystemFolder)]reg.exe" add "hklm\system\currentcontrolset\services\NS$EventingMSSolveInstance" /v ImagePath /t reg_expand_sz /d "[Service1Dir]NSService.exe ""EventingMSSolveInstance""" /f" /> <CustomAction Id="QtExecCmdLineRun6" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" /> <CustomAction Id="QtExecCmdLineSet7" Property="QtExecCmdLineRun7" Value=""[$(var.SystemFolder)]reg.exe" add "hklm\system\currentcontrolset\services\NS$EventingMSSolveInstance" /v FailureActions /t reg_binary /d 00000000000000000000000003000000630061000100000060ea00000100000060ea00000100000060ea0000 /f" /> <CustomAction Id="QtExecCmdLineRun7" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" /> <CustomAction Id="QtExecCmdLineSet8" Property="QtExecCmdLineRun8" Value=""[$(var.SystemFolder)]reg.exe" add "hklm\system\currentcontrolset\services\NS$EventingMSSolveInstance" /v Start /t reg_dword /d 2 /f" /> <CustomAction Id="QtExecCmdLineRun8" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" /> <CustomAction Id="QtExecCmdLineSet9" Property="QtExecCmdLineRun9" Value=""[$(var.SystemFolder)]net.exe" start NS$EventingMSSolveInstance" /> <CustomAction Id="QtExecCmdLineRun9" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" Return="ignore" /> <CustomAction Id="QtExecCmdLineSet10" Property="QtExecCmdLineRun10" Value=""[SQLNSBINDIR]nscontrol.exe" enable -name EventingMSSolveInstance -server [DATABASESHOST]" /> <CustomAction Id="QtExecCmdLineRun10" BinaryKey="WixCA" DllEntry="CAQuietExec" Execute="deferred" /> <Custom Action="QtExecCmdLineSet4" After="InstallSqlData">!Services=2 And ?Service1=2 And &Services=3 And $Service1=3</Custom> <Custom Action="QtExecCmdLineRun4" After="QtExecCmdLineSet4">!Services=2 And ?Service1=2 And &Services=3 And $Service1=3</Custom> <Custom Action="QtExecCmdLineSet5" After="QtExecCmdLineRun4">!Services=2 And ?Service1=2 And &Services=3 And $Service1=3</Custom> <Custom Action="QtExecCmdLineRun5" After="QtExecCmdLineSet5">!Services=2 And ?Service1=2 And &Services=3 And $Service1=3</Custom> <Custom Action="QtExecCmdLineSet6" After="QtExecCmdLineRun5">!Services=2 And ?Service1=2 And &Services=3 And $Service1=3</Custom> <Custom Action="QtExecCmdLineRun6" After="QtExecCmdLineSet6">!Services=2 And ?Service1=2 And &Services=3 And $Service1=3</Custom> <Custom Action="QtExecCmdLineSet7" After="QtExecCmdLineRun6">!Services=2 And ?Service1=2 And &Services=3 And $Service1=3</Custom> <Custom Action="QtExecCmdLineRun7" After="QtExecCmdLineSet7">!Services=2 And ?Service1=2 And &Services=3 And $Service1=3</Custom> <Custom Action="QtExecCmdLineSet8" After="QtExecCmdLineRun7">!Services=2 And ?Service1=2 And &Services=3 And $Service1=3</Custom> <Custom Action="QtExecCmdLineRun8" After="QtExecCmdLineSet8">!Services=2 And ?Service1=2 And &Services=3 And $Service1=3</Custom> <Custom Action="QtExecCmdLineSet9" After="QtExecCmdLineRun8">!Services=2 And ?Service1=2 And &Services=3 And $Service1=3</Custom> <Custom Action="QtExecCmdLineRun9" After="QtExecCmdLineSet9">!Services=2 And ?Service1=2 And &Services=3 And $Service1=3</Custom> <Custom Action="QtExecCmdLineSet10" After="QtExecCmdLineRun9">!Databases=2 And ?Database1=2 And &Databases=3 And $Database1=3</Custom> <Custom Action="QtExecCmdLineRun10" After="QtExecCmdLineSet10">!Databases=2 And ?Database1=2 And &Databases=3 And $Database1=3</Custom> -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Bob Arnson Sent: Saturday, September 13, 2008 9:39 AM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] getting working v1.0 -> v1.0 minor update using msp & msi solutions pulled together Robert O'Brien wrote: > q1 - should I expect that minor upgrade using msp or msi can shuffle a new > dll into place that may be loaded in an active window service process w/o > that service needing to be stopped prior to the file update and restarted > afterwards or a reboot being required? > No. > q2 - if I for safety reasons I do want to stop the windows service at start > of minor upgrade using msp or msi and restart it at the end of the minor > upgrade using msp or msi will adding the following customactions into my v1.1 > msi and setting the sequencing to ??? accomplish that? > Don't use unnecessary custom actions. Use ServiceControl which is already hooked into MSI's support for files-in-use detection. -- sig://boB http://joyofsetup.com/ ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users