I have researched all the web looking for clues about how to achieve this but no luck. I have a WiX installer project in Visual Studio 2013 which install a Windows Service (It doesn't contains UI, just console) and since it's installing a service, a user must be specified and that user's rights will be in effect. The problem is that this user is hard-coded on my .WXS file, and it works on my DEV and QA stacks but the user doesn't exists on prod so the installer doesn't work.
I would like to determine whether WXS files can have environment-specific logins defined in the fashion of config files or if anything like this exists.
I wouldn't like to have 3 Setup projects for each environment.
Here's the current WXS code edited for simplicity:
<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi">
<Product Id="Some ID"
Name="TestService"
Language="1033"
Version="1.0.0"
Manufacturer="TestManufacturer"
UpgradeCode="Some Upgrade Code">
<Package Compressed="yes"/>
<Media Id="1" Cabinet="test.cab" EmbedCab="yes"/>
<Property Id="LOGIN">HARD-CODED USER</Property>
<Property Id="PASSWORD">HARD-CODED PASSWORD</Property>
<Directory Name="SourceDir" Id="TARGETDIR">
<Directory Name="ProgramFilesFolder" Id="ProgramFilesFolder">
<Directory Name="TestDir" Id="_1">
<Directory Name="Service.ServiceSub" Id="_2">
<Component Id="_1" Guid="Some Guid">
<File Source="$(var.Service.ServiceSub.TargetPath)" />
<ServiceInstall
Id="TestServicee"
Name="TestService"
DisplayName="Test"
Type="ownProcess"
Start="auto"
ErrorControl="normal"
Description="This is a test"
Account="[LOGIN]"
Password="[PASSWORD]" />
<ServiceControl Id="StopTestService" Name="TestService" Stop="both" Wait="yes" Remove="uninstall" />
</Component>
</Directory>
</Directory>
</Directory>
</Directory>
<Feature Id="_1" Level="1">
<ComponentRef Id="_1"/>
</Feature>
</Product>
Please tell me if something is not clear, I can expand the info. Thanks for your help.