So to achieve the desired behaviour, setting the RegistryValue to Type
string but passing in a #-prefixed value will work with no side-affects,
correct?  I mean, besides being conceptually wonky, of course.

That is,

<RegistryValue Root="HKLM" Key="Software\MyCompany\MyProduct" Name="Port"
Value="[PORTVALUE]" Type="string" />

   <Property Id="PORTVALUE" Value="#1234">
     <RegistrySearch Id="RegPortValue" Root="HKLM"
Key="Software\MyCompany\MyProduct" Name="Port" Type="raw"></RegistrySearch>
   </Property>

Will write a DWORD on install, and also a DWORD on reinstall/upgrade?

:D


On 5/25/07, Rob Mensching <[EMAIL PROTECTED]> wrote:

 Unfortunately, by design.  That's the Windows Installer behavior for
RegSearch.  The MSI SDK will have more details if you desire.



*From:* [EMAIL PROTECTED] [mailto:
[EMAIL PROTECTED] *On Behalf Of *BES Installer
*Sent:* Friday, May 25, 2007 7:43 AM
*To:* Bob Arnson
*Cc:* Bei Liu (Volt); wix-users@lists.sourceforge.net
*Subject:* Re: [WiX-users] A bug?-get REG_SZ when using type="integer"



I'm seeing the same behaviour.

In my component I have the following lines:

<RegistryValue Root="HKLM" Key="Software\MyCompany\MyProduct" Name="Port"
Value="[PORTVALUE]" Type="integer" />

    <Property Id="PORTVALUE" Value="1234">
      <RegistrySearch Id="RegPortValue" Root="HKLM"
Key="Software\MyCompany\MyProduct" Name="Port" Type="raw"></RegistrySearch>
    </Property>

In the resulting package, the relevant line in the Property table is:

Property = PORTVALUE, Value="1234"

In the Registry table, Value = #[PORTVALUE].

When I run this on a fresh install, it correctly writes a DWORD with value
1234.
When in maintenance/upgrade, it writes a string with value #1234.

As far as I can tell, the value being retrieved from AppSearch is
"#1234".. but then when it tries to write it to the registry, the registry
value resolves to ##1234 which is a REG_SZ.

Does anyone know what I should be doing in this case?  Or does no one
beside me ( and the original poster, apparently) try to preserve DWORD
registry values?

Thanks,
:D

On 5/15/07, *Bob Arnson* <[EMAIL PROTECTED]> wrote:

Bei Liu (Volt) wrote:

When use the <RegistryValue>, set the Type="integer",

result: REG_SZ,

expect: REG_DWORD



Is this bug?


Unlikely but it's impossible to say without more details. Can you show a
minimal example that repro's the problem?

 --

sig://boB
http://joyofsetup.com/


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to