You probably also need the Substitution element (to hook the Configuration
values into the Property table entries from your module).

See the following pages on MSDN:
http://msdn.microsoft.com/library/aa368027.aspx
http://msdn.microsoft.com/library/aa370045.aspx
http://msdn.microsoft.com/library/aa370052.aspx

-----Original Message-----
From: Blair [mailto:os...@live.com] 
Sent: Tuesday, July 20, 2010 5:33 PM
To: 'General discussion for Windows Installer XML toolset.'
Subject: Re: [WiX-users] Passing Values from the ProductModule to a
MergeModule

Try the Configuration element under Module, and use the ConfigurationData
element under Merge to "hook it up".

-----Original Message-----
From: John Bergman [mailto:john.berg...@xpedienttechnologies.com] 
Sent: Tuesday, July 20, 2010 5:17 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Passing Values from the ProductModule to a
MergeModule

The warning is comforting :-()... Warning 6 The
Property/@SuppressModularization attribute has been set to 'yes'.  Using
this functionality is strongly discouraged; it should only be necessary as a
workaround of last resort in rare scenarios.


So I updated the MergeModule as follows:

    <Property Id="SERVICEUSER" SuppressModularization="yes"/>
    <Property Id="SERVICEPASSWORD"  SuppressModularization="yes"/>

But I am still not receiving the values,  here is the relevant part of the
log... any other ideas?

MSI (s) (84:AC) [19:14:54:752]: Doing action:
SetServiceUser.06C528FC_89E0_48C7_B32F_50DEAF36899F
MSI (s) (84:AC) [19:14:54:752]: Note: 1: 2205 2:  3: ActionText 
Action start 19:14:54: SetServiceUser.06C528FC_89E0_48C7_B32F_50DEAF36899F.
MSI (s) (84:AC) [19:14:54:753]: PROPERTY CHANGE: Deleting
ServiceUser.06C528FC_89E0_48C7_B32F_50DEAF36899F property. Its current value
is 'administrator'.
Action ended 19:14:54: SetServiceUser.06C528FC_89E0_48C7_B32F_50DEAF36899F.
Return value 1.
MSI (s) (84:AC) [19:14:54:753]: Doing action:
SetServicePassword.06C528FC_89E0_48C7_B32F_50DEAF36899F
MSI (s) (84:AC) [19:14:54:753]: Note: 1: 2205 2:  3: ActionText 
Action start 19:14:54:
SetServicePassword.06C528FC_89E0_48C7_B32F_50DEAF36899F.
MSI (s) (84:AC) [19:14:54:753]: PROPERTY CHANGE: Deleting
ServicePassword.06C528FC_89E0_48C7_B32F_50DEAF36899F property. Its current
value is 'password'.
Action ended 19:14:54:
SetServicePassword.06C528FC_89E0_48C7_B32F_50DEAF36899F. Return value 1.
MSI (s) (84:AC) [19:14:54:753]: Doing action: SetAppDBDatabase
MSI (s) (84:AC) [19:14:54:753]: Note: 1: 2205 2:  3: ActionText
 
-----Original Message-----
From: Christopher Painter [mailto:chr...@deploymentengineering.com] 
Sent: Tuesday, July 20, 2010 6:34 PM
To: General discussion for Windows Installer XML toolset.
Subject: Re: [WiX-users] Passing Values from the ProductModule to a
MergeModule

Modules don't exist in an installer.  Their components are merged and
associated to features and then they go away.   That said, you need to
define the property elements for ServiceUser and so on in the merge module
with no default value and SuppressModularization attribute set to
yes.     The rows won't get created in the Property table and no property
table will likely get created ( unless you define other properties with
values )  but the compiler will now understand to not molest your properties
with GUIDs.

 
Christopher Painter, Author of Deployment Engineering Blog Have a hot tip,
know a secret or read a really good thread that deserves attention? E-Mail
Me



----- Original Message ----
From: John Bergman <john.berg...@xpedienttechnologies.com>
To: General discussion for Windows Installer XML toolset. 
<wix-users@lists.sourceforge.net>
Sent: Tue, July 20, 2010 6:26:55 PM
Subject: [WiX-users] Passing Values from the ProductModule to a MergeModule

This post is a little long, but hopefully it provides enough information to 
provide some insight into what the
problem is that I am having, and when a solution or directions are provided,
it 
will provide enough context to
help others who may have the same requirement later.

I have been struggling with this for more than a day now.  I need to pass
some 
of the parameters received on the command line
of the installer to a MergeModule (all in Wix).  It is a Merge Module
because it 
will be provided to a customer to embed in
their installers as well.

Basically The Merge Module consists of a service, as follows (Pruned):

<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi";
      xmlns:util="http://schemas.microsoft.com/wix/UtilExtension";>

  <Module Id="MM.WindowService" Language="1033" Version="1.0.0.0">
    <Package Id="GUID2" InstallerVersion="200"  Manufacturer=" " />

    <Directory Id="TARGETDIR" Name="SourceDir">
      <Directory Id="MergeRedirectFolder">
        <Component Id='component_WindowsService' Guid="GUID1" DiskId='1'>

          <!-- Install the service -->
          <ServiceInstall
            Id='ServiceInstaller'  Type='ownProcess'  Vital="yes"  
Name="XPedientServiceHost"  DisplayName="XPedient Services Host"
            Description="XPedient Services Host"  Start="auto"
            Account="[ServiceUser]"
            Password="[ServicePassword]"
            ErrorControl="normal" Interactive="no" >
            <ServiceDependency Id="Eventlog" />
            <util:ServiceConfig FirstFailureActionType="restart" 
SecondFailureActionType="restart" ThirdFailureActionType="restart"/>
          </ServiceInstall>
        </Component>
      </Directory>
    </Directory>

    <Property Id="SERVICEUSER" Value=""/>
    <Property Id="SERVICEPASSWORD" Value="" />

    <Property Id="ServiceUser" Value="administrator"/>
    <Property Id="ServicePassword" Value="password" />

    <CustomAction Id='SetServiceUser' Property='ServiceUser' 
Value='[SERVICEUSER]' />
    <CustomAction Id='SetServicePassword' Property='ServicePassword' 
Value='[SERVICEPASSWORD]' />

    <InstallExecuteSequence>
      <Custom Action='SetServiceUser' After='LaunchConditions'></Custom>
      <Custom Action='SetServicePassword' After='LaunchConditions'></Custom>
    </InstallExecuteSequence>

  </Module>
</Wix>



I have tried it with and without the custom action and additional
properties.  I 
just cannot seem to figure out how to
get the information passed into the merge module; all of the googling I did 
indicated that others had tried, but I was
not able to find any further hints than what I have included within this
request 
for help.  I did see that Rob had answered
a similiar problem quite sometime ago but I did not understand his reply
about 
using .Module/@Property, and have not been
able to find any sort of information as to how that would work either.

The Product Module looks like this:



<?xml version="1.0" encoding="UTF-8"?>
<Wix xmlns="http://schemas.microsoft.com/wix/2006/wi"; 
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension";>

  <Product Id="GUID3" Name=" " Language="1033" Version="1.4.3.0" 
UpgradeCode="GUID4" Manufacturer=" ">
    <Package Id="*" InstallerVersion="200" Compressed="yes" Keywords=" " 
Description="" />
    <Media Id="1" Cabinet="WindowsService.cab" EmbedCab="yes" DiskPrompt=" 
Installation Media"/>
    <Directory Id='TARGETDIR' Name='SourceDir'>
      <Directory Id='ProgramFilesFolder' Name='PFiles'>
        <Directory Id="XT" Name="XT">

              <!-- WindowsService -->
              <Directory Id="WINDOWSSERVICE" Name="WindowsService">

                <Merge Id='mm.xpj.winservice' Language='1033' 
SourceFile='WindowsService.msm' DiskId='1'>
                  <ConfigurationData Name='SERVICEUSER' 
Value='[XPJDOMAIN]\[XPJUSER]'/>
                  <ConfigurationData Name='SERVICEPASSWORD' 
Value='[XPJPASSWORD]'/>
                </Merge>

<<<< SNIPPED >>>>>

    <!--
    **************************************************************
      Command Line Parameters, and Actions to Retrieve and User them
    **************************************************************
    -->

    <!-- Command Line Parameters (and their defaults -->
    <Property Id="XPJDOMAIN" Value="XPTDomain" />
    <Property Id="XPJUSER" Value="XPTUser" />
    <Property Id="XPJPASSWORD" Value="XPTPassword" />

    <!-- Custom Actions used to set the Command Line Parameters to the 
properties used for installation -->
    <CustomAction Id='SetPermissionableUser' Property='PermissionableUser' 
Value='[XPJDOMAIN]\[XPJUSER]' />

    <!--
    **************************************************************
      Install/Uninstall Actions
    **************************************************************
    -->

    <!-- Install/Uninstall Actions -->
    <InstallExecuteSequence>
      <Custom Action='SetPermissionableUser'
After='LaunchConditions'></Custom>
      <RemoveExistingProducts
After="InstallFinalize"></RemoveExistingProducts>
    </InstallExecuteSequence>

  </Product>
</Wix>

----------------------------------------------------------------------------
--
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


----------------------------------------------------------------------------
--
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