Click here to Skip to main content
15,897,968 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi
i have a setup file (Exa: Test.Exe)

i want to add the setup path (Exa: C\Program Files\-----------
or D:\Program Files\-------------- or any other location) in a windows registry by defining a name called as LocalApplicationExes.

means all this process takes place at the time of installing Test.Exe application..

how to do this by using C#3.0
Any idea please let me know.


Regards,
Pawan.
Posted

You can create a visual studio setup and deployment project for your application and get it done. The setup and deployment project contains a registry editor through which you can specify registry keys and values that should be created when the application is installed. You can define a new key and a new string value and set the string value to [TARGETDIR] and at the time of the installation the string value will be created in the registry with the folder that the user chooses to install the application. You can find more details in the below link.

http://www.simple-talk.com/dotnet/visual-studio/getting-started-with-setup-projects/[^]
 
Share this answer
 
Comments
Pawan Kiran 9-Jul-10 2:56am    
Reason for my vote of 5
Thanxs for your help, i am working on it. hopefully i get the things.justknow i searched registry entry's, everything is fine but some more work to finish it off.
You can't do anything with C# that involves what happens when you install an application, your C# does not run then. To store the path the user chose to install the app, during setup, you need a decent setup program that supports doing what you want.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900