I'm creating msi installer that run services with auto start for windows using wix toolset. msi was successfully compiled and installed, and services are working correctly.
The problem is that, when i try to uninstall the program in control panel, it's showing the following message:
I tried to remove the program from regedit and tried to install using the command:
MsiExec /I installer.msi REINSTALLMODE=voums REINSTALL=ALL
Here is the code of product and package declarations:
<Product Name='Foobar 1.0' Manufacturer='Acme Ltd.' Id='6DA5C23A-86C7-4D14-AEC0-86416A69ABDE' UpgradeCode='6DA5C23A-7349-453F-94F6-BCB5110BA4FD' Language='1033' Codepage='1252' Version='1.0.0'>
<Package Id='*' Keywords='Installer' Description="Acme's Foobar 1.0 Installer" Comments='Foobar is a registered trademark of Acme Ltd.' Manufacturer='Acme Ltd.' InstallerVersion='100' Languages='1033' Compressed='yes' SummaryCodepage='1252' />
In INSTALLDIR
, i have an exe file for service, and do some actions:
<Directory Id='INSTALLDIR' Name='Foobar 1.0'>
<Component Id='ConfPathEnv' Guid='6DA5C23A-6BE3-460D-A14F-75658D16550B' KeyPath="yes">
<Environment Id="AQLIGHT_CONFIG_PATH" Name="AQLIGHT_CONFIG_PATH" Value="[INSTALLDIR]config.json" Permanent="yes" Part="last" Action="set" System="yes" />
</Component>
<Component Id='MainExecutable' Guid='6DA5C23A-83F1-4F22-985B-FDB3C8ABD471'>
<File Id='serviceEXE' Name='service.exe' DiskId='1' Source='service.exe' KeyPath='yes' />
<ServiceInstall Id="InstallService" Name="AqLightService" DisplayName="AqLightService 1.0" Start="auto" ErrorControl="normal" Arguments="install" Type="ownProcess" />
<ServiceControl Id="ControlService" Name="AqLightService" Start="install" Stop="uninstall" Remove="uninstall" Wait="yes" />
</Component>
</Directory>
In order to remove folder when uninstalling the program, i use the following code:
<Directory Id="ProgramMenuFolder" Name="Programs">
<Directory Id="ProgramMenuDir" Name="Foobar 1.0">
<Component Id="ProgramMenuDir" Guid="6DA5C23A-7E98-44CE-B049-C477CC0A2B00">
<RemoveFolder Id='ProgramMenuDir' On='uninstall' />
<RegistryValue Root='HKCU' Key='Software\[Manufacturer]\[ProductName]' Type='string' Value='' KeyPath='yes' />
</Component>
</Directory>
</Directory>
I tried to change the GUIDs for each componet several times, but it did't help.