Check a verbose extra-info log (both the v and the x in your logging
parameters) and you will see exactly when those properties are set. You can
then find a place to set your property.

-----Original Message-----
From: John Bergman [mailto:john.berg...@xpedienttechnologies.com] 
Sent: Thursday, July 22, 2010 3:59 PM
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] [BUMP] Passing Values from the ProductModule to a
MergeModule - Solved (plus a question for clarification)

-- Copied from below, it would be appreciated if someone could shed some
insight into this.


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.



-----Original Message-----
From: John Bergman [mailto:john.berg...@xpedienttechnologies.com] 
Sent: Wednesday, July 21, 2010 12:48 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Passing Values from the ProductModule to a
MergeModule - Solved (plus a question for clarification)

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
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

----------------------------------------------------------------------------
--
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
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users


------------------------------------------------------------------------------
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
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to