Maybe and no. You should be looking at the Windows Installer properties for locations. There are properties such as ProgramFilesFolder and ProgramFiles64Folder that resolve to those locations at install time. In your case, the more useful one is the FileKey property for your file.
http://msdn.microsoft.com/en-us/library/windows/desktop/aa368609(v=vs.85).aspx Your registry value is then something like [#filekey] (and add your #1) and that resolves to the path to the file wherever it was installed. Phil W -----Original Message----- From: Rick Hantz (Hotmail) [mailto:rick_ha...@hotmail.com] Sent: Wednesday, March 07, 2012 10:49 AM To: 'General discussion for Windows Installer XML toolset.' Subject: Re: [WiX-users] Determining which OS is installed So would this work? I separated the command registry entry into two components. <Component Id="XXXXRegShellOpenCommand32bit" Guid="726CF30C-BC18-45A1-BAB1-3EEF08B8C10A" > <Condition> VersionNT64 >= 600 </Condition> <RegistryKey Id=XXXXRegShellOpenCommand32' Root='HKCR' Key=XXXX\Shell\open\command' Action='createAndRemoveOnUninstall'> <Permission User="Administrators" GenericAll="yes" /> <Permission User="Users" GenericAll="yes" /> <RegistryValue Type='string' Value='"C:\Program Files (x86)\XXXX\XXXX.exe" "%1"' /> </RegistryKey> </Component> <Component Id="XXXXRegShellOpenCommand64bit" Guid="9ADF87DE-D138-4AF1-ADE9-BDCB21736A0E" > <Condition> VersionNT >= 600</Condition> <RegistryKey Id='SmartListW32RegShellOpenCommand64' Root='HKCR' Key=XXXX\Shell\open\command' Action='createAndRemoveOnUninstall'> <Permission User="Administrators" GenericAll="yes" /> <Permission User="Users" GenericAll="yes" /> <RegistryValue Type='string' Value='"C:\Program Files (x86)\XXXX\XXXX.exe" "%1"' /> </RegistryKey> </Component> -----Original Message----- From: David Esiobu [mailto:david.esi...@citrix.com] Sent: Wednesday, March 07, 2012 10:18 AM To: General discussion for Windows Installer XML toolset. Subject: Re: [WiX-users] Determining which OS is installed Hi Rick, Please see the documentation for WiX preprocessor statements: http://wix.sourceforge.net/manual-wix3/preprocessor.htm Note that you can't use MSI properties there because preprocessor statements affect the build process, not the runtime behavior. Hope that helps, David -----Original Message----- From: Rick Hantz (Hotmail) [mailto:rick_ha...@hotmail.com] Sent: Wednesday, March 07, 2012 1:00 PM To: wix-users@lists.sourceforge.net Subject: [WiX-users] Determining which OS is installed I need to install an URL handler, which means different path entries if you have a 32 or 64bit OS installed. I tried: <?if (VersionNT64 >= 600) ?> <RegistryKey Id='XXXXRegShellOpenCommand' Root='HKCR' Key='SmartList\Shell\open\command' Action='createAndRemoveOnUninstall'> <Permission User="Administrators" GenericAll="yes" /> <Permission User="Users" GenericAll="yes" /> <RegistryValue Type='string' Value='"C:\Program Files (x86)\XXXX\XXXX.exe" "%1"' /> </RegistryKey> <?else?> <RegistryKey Id='SmartLXXXXRegShellOpenCommand' Root='HKCR' Key=XXXX\Shell\open\command' Action='createAndRemoveOnUninstall'> <Permission User="Administrators" GenericAll="yes" /> <Permission User="Users" GenericAll="yes" /> <RegistryValue Type='string' Value='"C:\Program Files\XXXX\XXXX.exe" "%1"' /> </RegistryKey> But it errors at (VersionNT64 >= 600). I'm a first time WiX user, using VS11 beta and one of the latest 3.6 beta builds.. Appreciate any help. Thanks, RickH _____ I am using the Free version of SPAMfighter <http://www.spamfighter.com/len> . SPAMfighter has removed 102072 of my spam emails to date. Do you have a slow PC? <http://www.spamfighter.com/SLOW-PCfighter?cid=sigen> Try free scan! ---------------------------------------------------------------------------- -- Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users ---------------------------------------------------------------------------- -- Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users -- I am using the free version of SPAMfighter. We are a community of 7 million users fighting spam. SPAMfighter has removed 102072 of my spam emails to date. Get the free SPAMfighter here: http://www.spamfighter.com/len The Professional version does not have this message ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users *** Confidentiality Notice: This e-mail, including any associated or attached files, is intended solely for the individual or entity to which it is addressed. This e-mail is confidential and may well also be legally privileged. If you have received it in error, you are on notice of its status. Please notify the sender immediately by reply e-mail and then delete this message from your system. Please do not copy it or use it for any purposes, or disclose its contents to any other person. This email comes from a division of the Invensys Group, owned by Invensys plc, which is a company registered in England and Wales with its registered office at 3rd Floor, 40 Grosvenor Place, London, SW1X 7AW (Registered number 166023). For a list of European legal entities within the Invensys Group, please go to http://www.invensys.com/en/legal/default.aspx. You may contact Invensys plc on +44 (0)20 3155 1200 or e-mail recept...@invensys.com. This e-mail and any attachments thereto may be subject to the terms of any agreements between Invensys (and/or its subsidiaries and affiliates) and the recipient (and/or its subsidiaries and affiliates). ------------------------------------------------------------------------------ Virtualization & Cloud Management Using Capacity Planning Cloud computing makes use of virtualization - but cloud computing also focuses on allowing computing to be delivered as a service. http://www.accelacomm.com/jaw/sfnl/114/51521223/ _______________________________________________ WiX-users mailing list WiX-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/wix-users