That is what I thought, but I was still having problems. I have resolve the
issue for what I need, (at least for now).
In the main product module, you need to declare the properties as follows:
<Property Id="DOMAIN" SuppressModularization="yes" Secure="yes" />
<Property Id="USER" SuppressModularization="yes" Secure="yes" />
<Property Id="PASSWORD" SuppressModularization="yes" Secure="yes" />
Then, in the Merge Module you have to set it up to receive the configuration,
and map it to the properties, this is what I have in my merge module
<Configuration Name="DOMAIN" Format="Key" Type="Identifier"
DefaultValue="DOMAIN" Description="Service Domain" DisplayName="Service
Domain"/>
<Configuration Name="USER" Format="Key" Type="Identifier"
DefaultValue="USER" Description="Service User" DisplayName="Service User"/>
<Configuration Name="PASSWORD" Format="Key" Type="Identifier"
DefaultValue="PASSWORD" Description="Service Password" DisplayName="Service
Password"/>
I was able to use the values in my service installer as follows:
<!-- Install the service -->
<ServiceInstall
Id='ServiceInstaller'
Type='ownProcess'
Vital="yes"
Name="XPedientServiceHost"
DisplayName="My Service"
Description="My Service"
Start="auto"
Account="[DOMAIN]\[USER]"
Password="[PASSWORD]"
ErrorControl="normal"
Interactive="no" >
<ServiceDependency Id="Eventlog" />
<util:ServiceConfig FirstFailureActionType="restart"
SecondFailureActionType="restart" ThirdFailureActionType="restart"/>
</ServiceInstall>
You also have to declare the properties
<Property Id="DOMAIN" SuppressModularization="yes" Secure="yes" />
<Property Id="USER" SuppressModularization="yes" Secure="yes" />
<Property Id="PASSWORD" SuppressModularization="yes" Secure="yes" />
What I was unable to get working is the code that combines the Domain\User in a
custom action, I suppose this has to do with the ordering if the CA,
<Property Id="PermissionableUser" Value="user"/>
<CustomAction Id='SetPermissionableUser' Property='PermissionableUser'
Value='[DOMAIN]\[USER]' />
<InstallExecuteSequence>
<Custom Action='SetPermissionableUser' After='LaunchConditions'></Custom>
</InstallExecuteSequence>
Can someone comment as to when the CA should execute to have access to the
imported properties? The location above does not work because the values are
still initialized.
(Also, Thanks to everyone that provided pointers, this would be a good
candidate for the WiX Wiki or tutorial, should someone care to add it). I
pruned the rest of the conversation so that this message is uncluttered.
------------------------------------------------------------------------------
This SF.net email is sponsored by Sprint
What will you do first with EVO, the first 4G phone?
Visit sprint.com/first -- http://p.sf.net/sfu/sprint-com-first
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users