Our WIX setup installs a windows service after asking logon account through a custom UI dialog.. The service starts after installation succeeds. Entire setup requires elevated privileges.
Hoping for any pointers regarding couple of questions:
Question 1 On attempting "Repair" from "Add/Remove Programs", UAC prompts for privilege elevation. After allowing so, the repair still fails with message:
"Service could not be installed. Verify that you have sufficient privileges to install system services".
Here's excerpt from code:
...
Privileged ...
<Component Id="C_ServiceEXE" Guid="{105F9C86-BF07-43C8-8C78-DF30F012CD68}">
<File Id="$(var.TargetFileName)" Name="$(var.TargetFileName)" KeyPath="yes" Assembly=".net"
AssemblyManifest="$(var.TargetFileName)" AssemblyApplication="$(var.TargetFileName)" DiskId="1"
Source="$(var.TargetDir)\$(var.TargetFileName)" />
<Condition>Privileged</Condition>
<ServiceInstall Id="Id_ServiceInstall"
Name ="$(var.ServiceName)"
Description="$(var.ServiceDescription)"
DisplayName="$(var.ServiceName)"
Account="[SERVICEACCOUNT]"
Password="[SERVICEPASSWORD]"
Start="auto"
ErrorControl="normal"
Type="ownProcess"
Vital="yes"
Interactive="no"
/>
<ServiceControl Id="Id_ServiceControl"
Name ="$(var.ServiceName)"
Remove="uninstall"
Start="install"
Stop="both"
Wait="yes"
/>
</Component>
...
I not quite sure why this is happening, since I admin am on on my Win7 dev box and have marked both the setup and speicifically the service install component to be run in privileged mode.
I suspect I might be missing scheduling repair inside an AdminInstallExecute sequence but not quite sure if that will fix this.
Question 2 Also, related question is - if repair does succeed, would it again require user to enter logon account via the UI. I'd rather suppress all interactive UIs during repair or upgrade. I realize that UPGRADINGPRODUCTCODE to detect upgrade.
But how is repair detected ?
Appreciate any help or pointers.