Hello,
Is there a recommended way to create a setup that allows the end user to customize defaults?
For example my applications needs a SQL Server connection string. The IT departments that are deploying the software would like to be able to set that information before telling the users were the setup is located on the network. I don't want to prompt each user for the connection string. I just want a hook for Sys Admins to add that information to the setup if it is already known.
It does not really matter where the end result is located. I can move everything around once I can find the information. For example could the setup copy a external file called defaults.txt to the target directory when the setup is run? Where defaults.txt may or may not exist in the same directory as the setup?
Thanks,
Mark
Recomended way to set end user defaults
Mark
There are so many ways this can be achieved. Below are some ideas.
1) Passing values in the command line. You can pass any value for variables in the command line, such as "TARGETDIR=C:\\Program Files\\MyApp". Be sure to enclose such values in double quotes if they contain embedded spaces. Once a variable has been assigned a value on the command line in this way, it remains constant during the entire setup script - its value never changes (even if you call Set Variable on it).
2) Reading values from an INI file. You may use the Get INI File Settings command to read values from a arbitrary INI file at any arbitrary location.
3) Reading values from an arbitrary file using the Read from Text File command. You may read values stored in any custom way you like.
Since the above are ways of getting saved information back into the setup (and the list is by no means exhaustive), the following would be ways to emit this information from a setup that has run:
1) Create a BAT file using Write to Text File command with the default parameters in place to launch the setup program.
2) Write values of variables that hold user selections using the Edit INI File command.
3) Write values in any arbitrary form using the Write to Text File command.
So as you can see, the basic idea is to save the values of variables that hold user selections and input in the user interface, and then to read them back in later. The above are just some ideas - choose the one that is easiest for you.
There are so many ways this can be achieved. Below are some ideas.
1) Passing values in the command line. You can pass any value for variables in the command line, such as "TARGETDIR=C:\\Program Files\\MyApp". Be sure to enclose such values in double quotes if they contain embedded spaces. Once a variable has been assigned a value on the command line in this way, it remains constant during the entire setup script - its value never changes (even if you call Set Variable on it).
2) Reading values from an INI file. You may use the Get INI File Settings command to read values from a arbitrary INI file at any arbitrary location.
3) Reading values from an arbitrary file using the Read from Text File command. You may read values stored in any custom way you like.
Since the above are ways of getting saved information back into the setup (and the list is by no means exhaustive), the following would be ways to emit this information from a setup that has run:
1) Create a BAT file using Write to Text File command with the default parameters in place to launch the setup program.
2) Write values of variables that hold user selections using the Edit INI File command.
3) Write values in any arbitrary form using the Write to Text File command.
So as you can see, the basic idea is to save the values of variables that hold user selections and input in the user interface, and then to read them back in later. The above are just some ideas - choose the one that is easiest for you.
Who is online
Users browsing this forum: Google [Bot], Majestic-12 [Bot] and 139 guests