I have a product with a similar requirement (it installs extensions to MS 
Office in both 32-bit and 64-bit flavors).  From a 32-bit install, you can ONLY 
write 32-bit registry entries.  I work around this issue using a Burn 
bootstrapper that installs the 32-bit support with the product, and installs 
the 64-bit support if installing on a 64-bit system and a 64-bit version of MS 
Office is detected.

--
John Merryweather Cooper
Senior Software Engineer | Enterprise Service Applications | Continuing 
Development
Jack Henry & Associates, Inc.® | Lenexa, KS  66214 | Ext:  431050 
|jocoo...@jackhenry.com



-----Original Message-----
From: vikasyv [mailto:vikas....@gmail.com] 
Sent: Wednesday, November 5, 2014 12:07 PM
To: wix-users@lists.sourceforge.net
Subject: [WiX-users] Adding Registry Entries in both 32 and 64 Bits


I have created an Installer which writes Registry Values to enable Chrome 
Extension (HKLM\Software\Google\Chrome). Till now, everything seemed fine.
Recently, we found out that using 64 bit Chrome on a 64 bit machine will not 
enable the Extension after install and it only writes to the Wow6432 node like 
a 32 bit Installer would do. I tried adding flags like Win64=yes for 64 bit but 
it is not solving the issue. Here is my code snippet.

 <Component Id='RegistryComponents'
Guid='{771E66CF-7086-4A56-AAF9-3571ADBEB9AA}' Win64='no'>
      <RegistryKey Id='ChromeExtnInstaller' Root='HKLM' 
Key='Software\Google\Chrome\Extensions\$(var.Extension)'
Action='createAndRemoveOnUninstall'>
        <RegistryValue Name='update_url' KeyPath='yes' Type='string'
Value='https://clients2.google.com/service/update2/crx' />
      </RegistryKey>
      <RegistryKey Id='NativeMessagingHost' Root='HKLM'
Key='Software\Google\Chrome\NativeMessagingHosts\&lt;NM_ID>'
Action='createAndRemoveOnUninstall'>
        <RegistryValue Type='string' Value='[INSTALLDIR]&lt;Value>' />
      </RegistryKey>
      <RemoveRegistryKey Action='removeOnUninstall' Root='HKLM'
Key='Software\Google\Chrome\Extensions\$(var.Extension)'/>
      <RemoveRegistryKey Action='removeOnUninstall' Root='HKLM'
Key='Software\Google\Chrome\NativeMessagingHosts'/>
      
    </Component>

    <?if $(var.Platform)=x64 ?>
    <Component Id='RegistryComponents64'
Guid='{20A0BA25-0EFC-49F5-8945-24F084EC3635}' Win64='yes'>
      <RegistryKey Id='ChromeExtnInstaller64' Root='HKLM'
Key='Software\Google\Chrome\Extensions\$(var.Extension)'
Action='createAndRemoveOnUninstall'>
        <RegistryValue Name='update_url' KeyPath='yes' Type='string'
Value='https://clients2.google.com/service/update2/crx' />
      </RegistryKey>
      <RegistryKey Id='NativeMessagingHost64' Root='HKLM'
Key='Software\Google\Chrome\NativeMessagingHosts\com.sling.wbsp'
Action='createAndRemoveOnUninstall'>
        <RegistryValue Name='Default' Type='string'
Value='[INSTALLDIR]com.sling.wbsp.json' />
      </RegistryKey>   
      <RemoveRegistryKey Action='removeOnUninstall' Root='HKLM'
Key='Software\Google\Chrome\Extensions\$(var.Extension)'/>
      <RemoveRegistryKey Action='removeOnUninstall' Root='HKLM'
Key='Software\Google\Chrome\NativeMessagingHosts'/>
    </Component>
    <?endif?>

And in the Feature section:
<ComponentRef Id="RegistryComponents"/>
 <?if $(var.Platform)=x64 ?>
 <ComponentRef Id="RegistryComponents64"/>  <?endif?>

Whether I use a 32 bit or 64 bit Installer, the Registry entries are only 
written to the Wow6432 node Looking up at the logs, this is what I see..

Executing op:
RegOpenKey(Root=-2147483646,Key=Software\Google\Chrome\Extensions\<ExtnID>,,BinaryType=0,,)
MSI (s) (F8:3C) [22:16:11:047]: Executing op:
RegAddValue(Name=update_url,Value=https://clients2.google.com/service/update2/crx,)
MSI (s) (F8:3C) [22:16:11:050]: Executing op: RegCreateKey() MSI (s) (F8:3C) 
[22:16:11:051]: Executing op:
RegOpenKey(Root=-2147483646,Key=Software\Google\Chrome\NativeMessagingHosts\com.sling.wbsp,,BinaryType=0,,)
MSI (s) (F8:3C) [22:16:11:051]: Executing op: RegAddValue(,Value=C:\Program 
Files (x86)\DishAnywhereDesktop\com.sling.wbsp.json,)
MSI (s) (F8:3C) [22:16:11:053]: Executing op: RegCreateKey() MSI (s) (F8:3C) 
[22:16:11:053]: Executing op:
RegOpenKey(Root=-2147483646,Key=Software\Google\Chrome\NativeMessagingHosts,,BinaryType=0,,)
MSI (s) (F8:3C) [22:16:11:053]: Executing op:
ActionStart(Name=RegisterProduct,Description=Registering
product,Template=[1])

Can anyone help me with this problem? Thanks in advance.

Regards
Vikas



--
View this message in context: 
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Adding-Registry-Entries-in-both-32-and-64-Bits-tp7597760.html
Sent from the wix-users mailing list archive at Nabble.com.

------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
NOTICE: This electronic mail message and any files transmitted with it are 
intended
exclusively for the individual or entity to which it is addressed. The message, 
together with any attachment, may contain confidential and/or privileged 
information.
Any unauthorized review, use, printing, saving, copying, disclosure or 
distribution 
is strictly prohibited. If you have received this message in error, please 
immediately advise the sender by reply email and delete all copies.


------------------------------------------------------------------------------
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to