[wix-users] Update service leaving logon unchanged

Guido Schneider Guido.Schneider at rohde-schwarz.com
Fri Nov 12 00:59:54 PST 2021


Hello,
I’m installing a windows service using the WIX toolset.
In some environments the service has to run under a certain service account.
Therefore the service login information is changed after the service was installed.
When the service is updated the login information is restored to "LocalSystem" and the desired service login information has to be configured again.

Is it possible to update a service and leave the service login information unchanged?

Sample service definition:
...
        <Component Id="SampleSvc.exe" Guid=" 0772B74C-AF0C-4E32-86AC-36B6AE2285CC">
          <File Id="SampleSvc.exe" Name="SampleSvc.exe" Source="..\src\SampleSvc\$(var.BuildConfiguration)\SampleSvc.exe" KeyPath="yes" />
          <ServiceInstall Id="SampleSvcServiceInstall"
                          Name="$(var.SampleServiceName)"
                          Type="ownProcess"
                          Start="demand"
                          ErrorControl="normal"
                          DisplayName="Sample Service"
                          Description=" Sample Service Description "
                          >
            <ServiceDependency Id="Another_Service" />
            <util:ServiceConfig FirstFailureActionType="restart"
                                SecondFailureActionType="restart"
                                ThirdFailureActionType="restart"
                                RestartServiceDelayInSeconds="10" />
          </ServiceInstall>
          <ServiceControl Id="SampleSvcServiceControl" Name="rs_SampleSvc_service" Remove="both" Stop="both" />
        </Component>
...


Best regards
Guido Schneider


Content provided within this e-mail including any attachments, is for the use of the intended recipients and may contain Rohde & Schwarz company restricted information. Any unauthorized use, disclosure, or distribution of this communication in whole or in part is strictly prohibited. If you are not the intended recipient, please notify the sender by reply email or by telephone and delete the communication in its entirety.


More information about the wix-users mailing list