Making Wix install for my service app I ran into such trouble - when I choose "repair" option, after install i am prompted to restart my pc. Actually my test install contains only two files.Although there are attributes that make installer stop the service (and it actually stops and uninstall service due to log), files are still busy with the service's process. What am I doing wrong? Is there any workarounds? How Can i get rid of restart prompting in this case? here is the code of installer:
<Fragment>
<ComponentGroup Id="ProductComponents" Directory="AGENTFOLD">
<Component Id="WindowsAgent" Guid="*">
<File Id="WinAgent" KeyPath="yes" Source="WindowsAgent.exe"/>
<ServiceInstall Id='WindowsAgentInst' Name='WindowsAgent' DisplayName='WindowsAgent' Type='ownProcess' Account='LocalSystem' Start='auto' ErrorControl='normal'/>
<ServiceControl Id="WindowsAgentControl" Name="WindowsAgent" Stop="both" Start="install" Remove="uninstall" Wait="yes" />
</Component>
<Component Id="cmp2" Guid="GUIDHERE">
<File Id="fil2" KeyPath="yes" Source="mydll.dll" />
</Component>
</ComponentGroup>
</Fragment>
here is what log says:
Info 1603. The file C:\Program Files(x86)\WindowsAgent\mydll.dll is being held in use. Close that application and retry.
MSI (s) (88:78) [17:01:50:993]: Product: Setuptest. The file C:\Program Files (x86)\WindowsAgent\mydll.dll is being used by the following process: Name: WindowsAgent , Id 3384.
Info 1603. The file C:\Program Files (x86)\WindowsAgent\WindowsAgent.exe is being held in use. Close that application and retry.
MSI (s) (88:78) [17:01:51:182]: Product: Setuptest. The file C:\Program Files(x86)\WindowsAgent\WindowsAgent.exe is being used by the following process: Name: WindowsAgent , Id 3384.
Note that if I stop service manually before repair, everything works fine.