Hi,

I think that you need to publish the property on the dialog where you have the 
form

        <Publish Property="DeviceType " Value="1">DeviceType = "1"</Publish>

I had a similar problem, and this is how I've fixed it.

-----Original Message-----
From: Алексей Старчиков [mailto:vun...@bk.ru] 
Sent: Tuesday, February 02, 2010 3:24 PM
To: wix-users@lists.sourceforge.net
Subject: [SPAM] - [WiX-users] Storing variale value after installation - Email 
found in subject

I'm trying to save variable value after installation, to read it at upgrade.

...
<Property Id="DeviceType">2</Property>
...
    <DirectoryRef Id="INSTALLDIR">
      <Component Id="dfPost4GUIConfig_DeviceType" 
Guid="6067EE7C-3E53-4DAE-8FCF-5BFDA2C6E81A">
        <RegistryValue Root="HKCU" 
Key="Software\DFPost\DFPost40\[ConfigName]\Setup" Type="string" 
Name="DeviceType" Value="[DeviceType]" KeyPath="yes"/>
      </Component>
    </DirectoryRef>
...

At dialog I using variable to store the ComboBox item value:
...
  <?define ConfigValueClientAnalyze=     "1" ?>
  <?define ConfigValueClientDirFinder=   "2" ?>
  <?define ConfigValue1ch8500=           "3" ?>
  <?define ConfigValue1chSVRK=           "4" ?>
  <?define ConfigValue1chHFst=           "5" ?>
  <?define ConfigValue1chHFmob=          "6" ?>
  <?define ConfigValue1chBarscPCI=       "7" ?>
...
        <Control Id="DeviceTypeLabel" Type="Text" X="25" Y="55" Width="320" 
Height="15" Transparent="yes" NoPrefix="yes" 
Text="!(loc.DeviceTypeSelectDlgDeviceTypeLabel)" />
        <Control Type="ComboBox" Property="DeviceType" Id="DeviceChannelsCount" 
Width="280" Height="16" X="25" Y="70" Sorted="yes" ComboList="yes">
          <ComboBox Property="DeviceType">
            <ListItem Text="!(loc.ConfigClientAnalyze)"      
Value="$(var.ConfigValueClientAnalyze)"/>
            <ListItem Text="!(loc.ConfigClientDirFinder)"    
Value="$(var.ConfigValueClientDirFinder)"/>
            <ListItem Text="!(loc.Config1ch8500)"            
Value="$(var.ConfigValue1ch8500)"/>
            <ListItem Text="!(loc.Config1chSVRK)"            
Value="$(var.ConfigValue1chSVRK)"/>
            <ListItem Text="!(loc.Config1chHFst)"            
Value="$(var.ConfigValue1chHFst)"/>
            <ListItem Text="!(loc.Config1chHFmob)"           
Value="$(var.ConfigValue1chHFmob)"/>
            <ListItem Text="!(loc.Config1chBarscPCI)"        
Value="$(var.ConfigValue1chBarscPCI)"/>
          </ComboBox>
        </Control>
...

But after installation in registry allways writes value "2". What I did wrong?

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
s://lists.sourceforge.net/lists/listinfo/wix-users

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to