visual studio - Is there any way for a .NET application to read a variable defined at installation time? -
With the Visual Studio setup project, I can ask the user for some input, such as the location of the folder. Any way to install user input, is there any way?
The easiest way to do this is to store the value in the registry:
-
Right-click on your setup project and see -> User Interface
-
Install and move it to the right place in order
-
In each of the dialogs, a property property , such as Edit1Property or ButtonProperty Rti name must be a unique value, by default it's EDITA1 as some.
-
Right-click on your setup project and select -> Registry
-
HKCU \ Software \ [creator]
orHKCU \ Software \ [creator]
depends on whether you want to store this setting only for the current user or Machine wide You can also create a new entry under user / machine hive after which the entry will be stored under HKCU or HKLM, depending on whether the installation is per-user or per-machine. -
Create a new value under the selected key in 5 In the view of the properties of that value, enter the property name of the control that is specified in step 3. This name should be in square bracket, for example [EDITA1] and you have done it. / P>
Comments
Post a Comment