How to determine the installation directory in a setup project...
-
Hi I have just finished my first .Net application and am now trying to create a setup project using the VS .net feature. In the setup I should create some new Registry entries on the target machine which have the installation directory in its value. My question now is: How can I determine, on which directory the application has been installed? And how can I write then this value into the registry key? I tried it with the variable "ARPINSTALLLOCATION", but this variable was empty. Thanks and regards Fredy
-
Hi I have just finished my first .Net application and am now trying to create a setup project using the VS .net feature. In the setup I should create some new Registry entries on the target machine which have the installation directory in its value. My question now is: How can I determine, on which directory the application has been installed? And how can I write then this value into the registry key? I tried it with the variable "ARPINSTALLLOCATION", but this variable was empty. Thanks and regards Fredy
As long as you know how to create the Registry keys in the VS IDE you are in good shape. Create the key, create the value name and then set the value to: [TARGETDIR] [TARGETDIR] will be replavced by the app folder. You can also combine [TARGETDIR] with other strings. You need to be aware that [TARGETDIR] will be replaced by the app install folder with the trailing \ appended. So, say you want to store the path to your application, for example "MyApp.EXE". Set the value to: [TARGETDIR]MyApp.EXE Suppose you user installs to "C:\Program Files\Some Application\". If you create a reg key/value and set the value in your setup to: [TARGETDIR]MyApp.EXE then after the setup has run the value will be: "C:\Program Files\Some Application\MyApp.EXE" Do NOT do this: [TARGETDIR]\MyApp.EXE This will write a value to the registry as: "C:\Program Files\Some Application**\\**MyApp.EXE" Robert
-
As long as you know how to create the Registry keys in the VS IDE you are in good shape. Create the key, create the value name and then set the value to: [TARGETDIR] [TARGETDIR] will be replavced by the app folder. You can also combine [TARGETDIR] with other strings. You need to be aware that [TARGETDIR] will be replaced by the app install folder with the trailing \ appended. So, say you want to store the path to your application, for example "MyApp.EXE". Set the value to: [TARGETDIR]MyApp.EXE Suppose you user installs to "C:\Program Files\Some Application\". If you create a reg key/value and set the value in your setup to: [TARGETDIR]MyApp.EXE then after the setup has run the value will be: "C:\Program Files\Some Application\MyApp.EXE" Do NOT do this: [TARGETDIR]\MyApp.EXE This will write a value to the registry as: "C:\Program Files\Some Application**\\**MyApp.EXE" Robert