Reputation: 17475
I know how to manually add a key in the registry to execute some .exe file, with the file as parameter, when the user right-clicks a file of a given extension. I can build my .exe with an install wizard and test it manually in the console with an input file (as command line parameter).
I wish to pack all of the install process in my install wizard (at the moment the install process doesnt package the registry modification). I have spotted some example of some programmatic modification of the registry here, but I need to be able to retrieve the location at which the user chooses to install during the install wizard process, so that I can refer to this location to point to my .exe in from the registry key. How can I do that ? Where can I plug some code in an install wizard ?
UPDATE :
Upvotes: 1
Views: 281
Reputation: 21416
If you use a dedicated setup authoring tool, all you need to do will become a lot easier. This includes getting the installation folder and using it during install.
Here is a list which can get you started: http://en.wikipedia.org/wiki/List_of_installation_software
After you decide on a tool, you can try configuring the registry, your EXE file, the installation folder etc. If you encounter problems you can then ask more specific questions (for example the installation folder is retrieved differently for each tool).
Edit:
For example, in a Visual Studio setup project you can use the TARGETDIR installer property. In this case your registry entry value can be something like this:
[TARGETDIR]file name.exe
Upvotes: 1