Windows Develop Bookmark and Share   
 index > ClickOnce and Setup & Deployment Projects > Want to add a registry entry while installation
 

Want to add a registry entry while installation

I want to add a registry entry called path, where the installation path (that have been chosen by the user while he installs) will be inserted. Can you please let me know how can I do it...

I am new to this deployment project, so help me Please ... Waiting for you all.
Abhishek2  Friday, October 12, 2007 10:12 AM
Just create a registry item with the exact name of [TARGETDIR] . This will resolve to the actual path where the app gets installed.

PhilWilson  Friday, October 12, 2007 5:47 PM

Does Start->Run mean literally the Run dialog? Or do you mean a shortcut? It's relatively easy to add a shortcut, and you don't need TARGETDIR or anything.

Assuming you mean that Run dialog, what you need is not the Path variable. You need to write:

[TARGETDIR]Your.exe

as the default data item into

HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\Your.exe

PhilWilson  Monday, October 15, 2007 8:40 PM
no one is answering yet... Please answer me. will I have to write any code for that, or there is a possibility of getting the path to the registry editor.. Whatever... please tell me anybody. I am waiting for your help .....
Abhishek2  Friday, October 12, 2007 11:03 AM
Just create a registry item with the exact name of [TARGETDIR] . This will resolve to the actual path where the app gets installed.

PhilWilson  Friday, October 12, 2007 5:47 PM

Why do you want to write the installation directory to the registry? Who will be using this information? And when will it be used?

Collin B  Friday, October 12, 2007 7:05 PM
Actually, I want to add a run command, so that after installation procedure is complete, the user will run the application by calling a command from start->run. To do this I need to add a registry item for the application, which will track the path of the exe where the program is going to be installed.

I need to know how to set the path of the exe to a registry string variable called path. Please let me know this ... Will [TARGETDIR] will work for me...
Abhishek2  Monday, October 15, 2007 5:59 AM

Does Start->Run mean literally the Run dialog? Or do you mean a shortcut? It's relatively easy to add a shortcut, and you don't need TARGETDIR or anything.

Assuming you mean that Run dialog, what you need is not the Path variable. You need to write:

[TARGETDIR]Your.exe

as the default data item into

HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths\Your.exe

PhilWilson  Monday, October 15, 2007 8:40 PM
Thank you PhilWilson. The code really worked out. Thanks very much
Abhishek2  Wednesday, October 17, 2007 11:27 AM

You can use google to search for other answers

Custom Search

More Threads

• 2 Windows App. Deployment Questions
• Auto-updating applications - options?
• fire event after uninstall?
• Another Icon in ClickOnce Deplyment?
• Error come when try to install clickonce application from website
• Winforms distributed app security
• What is the difference between .net framework sdk and .net framework Redistributable?
• Combine Click Once AND MSI SetUp?
• vs 2008 clickonce .net 3.0 as prerequisite
• Database Project Setup