REQUIREMENT-

To add a registry key (InstallLocation) that can point to the full path to the application's primary folder

RESOLUTION-

Any application that gets installed using the windows installer engine, stores the ‘full path to the application's primary folder’ as a string value ‘InstallLocation’ under either of these two registry key : 

Key: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{product_code}\

OR

Key:  HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{product_code}

Value of the "InstallLocation" is added by the public property ‘ARPINSTALLLOCATION’ and typically this needs to be set by a custom action. Here is the sample custom action that can be added to the installer project-

Action: SetARPINSTALLLOCATION             

Type: 51                        

Source: ARPINSTALLLOCATION                           

Target: [TARGETDIR]

In my case I am adding this custom action using Orca, this is how it looks like:

clip_image002

This action also needs to be added under the Execute sequence after the CostFinalize Action.

clip_image004

 

Content by: Keshav Deo Jain