Reputation: 65544
I'm creating a MSI and need to write to the registry (I use a URI Schema for hyperlinks to open the program).
The problem I have is writing the registry key for x86 and x64.
On 64 bit PCs the application will be installed to c:\Program Files (x86)\
On 32 bit PCs to c:\Program Files.
Ideally I was hoping to use a Environment Variable that would work on both PCs. eg:
"%programfiles%\MyFolder\MyApp.exe" %1
Does anyone know the method to write the registry key in the MSI so the file path works for both Operating Systems?
Upvotes: 0
Views: 1706
Reputation: 65544
I've already done this before:
https://stackoverflow.com/a/11490003/495455
I forgot to use [TARGETDIR].
Upvotes: 1