Create a Registry key during deployment to save program location

GDMI

New member
Joined
May 15, 2006
Messages
1
Programming Experience
Beginner
I am trying to create an entry (key/value) in the Registry to save the program location during deployment (installation). I know how to add/read an entry in/from the Registry I also know that I can use the Registry window in the deployment project to create any entry during installation. But I want the deployment package to be able to save whatever location that the user chooses during installation (eg: "c:\Program Files\myCompanyName\myProgram.exe") as an entry in the Registry for example key/value:
"HKEY_LOCAL_MACHINE\SOFTWARE\myCompany\ProgramPath"
value: "c:\Program Files\myCompanyName\myProgram.exe"

Basically, I need to create an entry in the Registry so that other programs can locate my application . Unfortuanately, registring some file formats to be linked to my application which could be a way around this issue is not an option for me.

Thanks,
 
When an application runs it will run from the install directory correct? I doubt this is the answer you're looking for but why not just get the install path when the program loads and then store the key if it doesnt already exist. I know this requires that the program run once before the key can be used but I dunno how else to do this. What are you using to deploy the program and that? Using the built-in installer? I know that with InstallShield and that you can use parameters to get the info you want and then use it. I havent worked with the built-in installer though but I can ask a teammate who uses it often if you havent already solvd your problem?
 
Back
Top