views:

167

answers:

2

Hi,

I'm making an installation project for my .net app (c#), and i want it to add some entries to the registry, but in some of them I need to write the installation folder, and in other I want to save the full path of the main result of the app (the .exe file)

How can i do this? are there some special variables or something like that i can use (for example %app_path%\%app_exe_name% -d "%1" ...)

I'm using VS 2005 for the app and the installation project

A: 

Set the value of the registry entry to [TARGETDIR] or [TARGETDIR]AppName.exe

jmatthias
+3  A: 

Have you tried using [TARGETDIR]. When adding a registry item that needs to refer to a filepath, you can use attributes like [TARGETDIR]. For example, if you needed to refer to the file test.exe that was located in the applications folder, then you would enter [TARGETDIR]test.exe.

JohnC