0

I have been working on a Visual Studio Setup & Deployment project which has a pre-requisite for JRE installed in the system. I am using a search and launch condition to check for the JRE registry key and based on that providing the user with a url to download the JRE and continue after installation.

While this is working, the requirement is being able to search the correct registry location based on a 32/64 bit OS and provide the user with the respective download url for a 32/64 bit JRE.

I have not been able to figure out if it is possible in a VS.Net setup project to provide conditional search and or launch conditions based on whether the installer in running in a 32 or 64 bit system. As per my understanding, we should be creating two separate installers targeting a 32 bit and 64 bit system.

Can anybody shed some light on this.

Cœur
  • 37,241
  • 25
  • 195
  • 267
koder
  • 887
  • 9
  • 29

1 Answers1

0

Yes you should be creating two installers, one per architecture:

http://blogs.msdn.com/b/heaths/archive/2008/01/15/different-packages-are-required-for-different-processor-architectures.aspx

However the other problem is that there has always been a bug in the registry searches in VS setup projects that breaks the 64-bit registry search. Build your x64 setup project with the search and then get an MSI editor (such as Orca, install from Orca.msi in the Windows SDK). Open your x64 MSI and go to the RegLocator table, which should be populated with some data about your search.

http://msdn.microsoft.com/en-us/library/aa371171(v=vs.85).aspx

You might find that the Type field does not have the msidbLocatorType64bit set, so even a x64 search will search the 32-bit registry, so add that bit manually with Orca if it's missing to see if it helps.

PhilDW
  • 20,260
  • 1
  • 18
  • 28