Create and set Registry string with the "App Installed Location Path" value

123 views Asked by At

I'm creating an msi file for my project. I am using VS2010 template 'Setup Project' to accomplish the task. Now the problem is I need to create & set a Registry string value to the value where the "Application is installed by the User" i.e. I am in need of a registry string that holds the installed app's location. I could view the registry and create a registry string but the issue is the user can install the app anywhere he/she wishes to.

1

There are 1 answers

2
PhilDW On BEST ANSWER

Create the registry item in the setup project's registry view and use case-sensitive [TARGETDIR] for the value. TARGETDIR is the property associated with that Application Folder, and square brackets cause it to resolve to the actual value.