The Setup program accepts optional command line parameters. These can be useful to system administrators, and to other programs calling the Setup program.
- Inno Setup Change Install Directory Exists Free
- Program Install Directory
- Inno Setup Directory Exists
- What Is Install Directory
When this flag is specified, Setup will first try deleting the value if it exists. If ValueType is not none, it will then create the key if it didn't already exist, and the new value. When this flag is specified, Setup will not attempt to create the key or any value if the key did not already exist on the user's system. Only install the file if a file of the same name already exists on the user's system. This flag may be useful if your installation is a patch to an existing installation, and you don't want files to be installed that the user didn't already have. Only install the file if it doesn't already exist on the user's system.
Disables the This will install.. Do you wish to continue? prompt at the beginning of Setup. Of course, this will have no effect if the DisableStartupPrompt[Setup] section directive was set to yes.
Instructs Setup to be silent or very silent. When Setup is silent the wizard and the background window are not displayed but the installation progress window is. When a setup is very silent this installation progress window is not displayed. Everything else is normal so for example error messages during installation are displayed and the startup prompt is (if you haven't disabled it with DisableStartupPrompt or the '/SP-' command line option explained above).
If a restart is necessary and the '/NORESTART' command isn't used (see below) and Setup is silent, it will display a Reboot now? message box. If it's very silent it will reboot without asking.
Instructs Setup to suppress message boxes. Only has an effect when combined with '/SILENT' and '/VERYSILENT'.
The default response in situations where there's a choice is:
- Yes in a 'Keep newer file?' situation.
- No in a 'File exists, confirm overwrite.' situation.
- Abort in Abort/Retry situations.
- Cancel in Retry/Cancel situations.
- Yes (=continue) in a DiskSpaceWarning/DirExists/DirDoesntExist/NoUninstallWarning/ExitSetupMessage/ConfirmUninstall situation.
- Yes (=restart) in a FinishedRestartMessage/UninstalledAndNeedsRestart situation.
5 message boxes are not suppressible:
- The About Setup message box.
- The Exit Setup? message box.
- The FileNotInDir2 message box displayed when Setup requires a new disk to be inserted and the disk was not found.
- Any (error) message box displayed before Setup (or Uninstall) could read the command line parameters.
- Any message box displayed by [Code] support function MsgBox.
Causes Setup to create a log file in the user's TEMP directory detailing file installation and [Run] actions taken during the installation process. This can be a helpful debugging aid. For example, if you suspect a file isn't being replaced when you believe it should be (or vice versa), the log file will tell you if the file was really skipped, and why.
The log file is created with a unique name based on the current date. (It will not overwrite or append to existing files.)
The information contained in the log file is technical in nature and therefore not intended to be understandable by end users. Nor is it designed to be machine-parseable; the format of the file is subject to change without notice.
Same as /LOG, except it allows you to specify a fixed path/filename to use for the log file. If a file with the specified name already exists it will be overwritten. If the file cannot be created, Setup will abort with an error message.
Prevents the user from cancelling during the installation process, by disabling the Cancel button and ignoring clicks on the close button. Useful along with '/SILENT' or '/VERYSILENT'.
Instructs Setup not to reboot even if it's necessary.
Specifies the custom exit code that Setup is to return when a restart is needed. Useful along with '/NORESTART'. Also see Setup Exit Codes.
Instructs Setup to load the settings from the specified file after having checked the command line. This file can be prepared using the '/SAVEINF=' command as explained below.
Don't forget to use quotes if the filename contains spaces.
Instructs Setup to save installation settings to the specified file. Cisco vpn client mac os x 64 bit download.
Don't forget to use quotes if the filename contains spaces.
Specifies the language to use. language specifies the internal name of the language as specified in a [Languages] section entry.
When a valid /LANG parameter is used, the Select Language dialog will be suppressed.
Overrides the default directory name displayed on the Select Destination Location wizard page. A fully qualified pathname must be specified.
Overrides the default folder name displayed on the Select Start Menu Folder wizard page. If the [Setup] section directive DisableProgramGroupPage was set to yes, this command line parameter is ignored.
Instructs Setup to initially check the Don't create a Start Menu folder check box on the Select Start Menu Folder wizard page.
Overrides the default setup type.
If the specified type exists and isn't a custom type, then any /COMPONENTS parameter will be ignored.
Overrides the default component settings. Using this command line parameter causes Setup to automatically select a custom type. If no custom type is defined, this parameter is ignored.
Inno Setup Change Install Directory Exists Free
Only the specified components will be selected; the rest will be deselected.
If a component name is prefixed with a '*' character, any child components will be selected as well (except for those that include the dontinheritcheck flag). If a component name is prefixed with a '!' character, the component will be deselected.
This parameter does not change the state of components that include the fixed flag.
/COMPONENTS='help,plugins'
/COMPONENTS='*parent,!parentchild'
Specifies a list of tasks that should be initially selected.
Only the specified tasks will be selected; the rest will be deselected. Use the /MERGETASKS parameter instead if you want to keep the default set of tasks and only select/deselect some of them.
If a task name is prefixed with a '*' character, any child tasks will be selected as well (except for those that include the dontinheritcheck flag). If a task name is prefixed with a '!' character, the task will be deselected.
/TASKS='desktopicon,fileassoc'
The information contained in the log file is technical in nature and therefore not intended to be understandable by end users. Nor is it designed to be machine-parseable; the format of the file is subject to change without notice.
Same as /LOG, except it allows you to specify a fixed path/filename to use for the log file. If a file with the specified name already exists it will be overwritten. If the file cannot be created, Setup will abort with an error message.
Prevents the user from cancelling during the installation process, by disabling the Cancel button and ignoring clicks on the close button. Useful along with '/SILENT' or '/VERYSILENT'.
Instructs Setup not to reboot even if it's necessary.
Specifies the custom exit code that Setup is to return when a restart is needed. Useful along with '/NORESTART'. Also see Setup Exit Codes.
Instructs Setup to load the settings from the specified file after having checked the command line. This file can be prepared using the '/SAVEINF=' command as explained below.
Don't forget to use quotes if the filename contains spaces.
Instructs Setup to save installation settings to the specified file. Cisco vpn client mac os x 64 bit download.
Don't forget to use quotes if the filename contains spaces.
Specifies the language to use. language specifies the internal name of the language as specified in a [Languages] section entry.
When a valid /LANG parameter is used, the Select Language dialog will be suppressed.
Overrides the default directory name displayed on the Select Destination Location wizard page. A fully qualified pathname must be specified.
Overrides the default folder name displayed on the Select Start Menu Folder wizard page. If the [Setup] section directive DisableProgramGroupPage was set to yes, this command line parameter is ignored.
Instructs Setup to initially check the Don't create a Start Menu folder check box on the Select Start Menu Folder wizard page.
Overrides the default setup type.
If the specified type exists and isn't a custom type, then any /COMPONENTS parameter will be ignored.
Overrides the default component settings. Using this command line parameter causes Setup to automatically select a custom type. If no custom type is defined, this parameter is ignored.
Inno Setup Change Install Directory Exists Free
Only the specified components will be selected; the rest will be deselected.
If a component name is prefixed with a '*' character, any child components will be selected as well (except for those that include the dontinheritcheck flag). If a component name is prefixed with a '!' character, the component will be deselected.
This parameter does not change the state of components that include the fixed flag.
/COMPONENTS='help,plugins'
/COMPONENTS='*parent,!parentchild'
Specifies a list of tasks that should be initially selected.
Only the specified tasks will be selected; the rest will be deselected. Use the /MERGETASKS parameter instead if you want to keep the default set of tasks and only select/deselect some of them.
If a task name is prefixed with a '*' character, any child tasks will be selected as well (except for those that include the dontinheritcheck flag). If a task name is prefixed with a '!' character, the task will be deselected.
/TASKS='desktopicon,fileassoc'
/TASKS='*parent,!parentchild'
Like the /TASKS parameter, except the specified tasks will be merged with the set of tasks that would have otherwise been selected by default.
If UsePreviousTasks is set to yes, the specified tasks will be selected/deselected after any previous tasks are restored.
/MERGETASKS='desktopicon,fileassoc'
/MERGETASKS='!desktopicon'
Specifies the password to use. If the [Setup] section directive Password was not set, this command line parameter is ignored.
When an invalid password is specified, this command line parameter is also ignored.
Recently, I've been relying on Inno Setup installation scripts to build setup executables for my Windows installs. I've given up on .NET deployment projects, and even InstallShield Express (why does my brain insist on reading ‘Express' as ‘CrippleWare‘?) given their limitations.
Program Install Directory
The two big wins with Inno Setup for me are 1) it's freeware, and 2) if I need to do something funky, I can roll my own behaviour into the script with its Pascal scripting option.
Today's post is how I wrote an installer wizard that prompts the user for a 'Data Directory' that receives data that I don't want sitting in the 'Program Files' area of Windows, and a configuration file so I can re-install to a different data-directory and allow the program toggle between them via config file modifications.
I do this because a very wise man once pointed out to me that:
Data that evolves at different rates should be designed to evolve separately.
Programming tends to evolve more slowly than input data, which can typically evolve more slowly than output data. This approach is a tip of the hat to his wisdom. Also, as I've learned several times:
The programs can come and go, but if you let it, the data will outlive them.
So, back to Inno Script and getting it to generate a config-file at install time that points at the Data-directory we will store our data to. I've settled on INI files, given their ease of understanding for my target users, and Inno Setup's favouring of them.
First, I define a directory under the [Dirs] section. The name of the directory is delegated to being resolved via a call to some code I define later called GetDataDir(). I check that the directory doesn't exist. I ask that it not be uninstalled with the software, and I grant the user permission to modify the directory contents:
Then in the [Files] section, I identify the files I want (here an entire directory I've pre-defined with the constant {#DataDir}. I ask that it confirms any over-write that it might have to do of pre-existing data, to recurse through any sub-directory and again, that the contents are to be left intact on an uninstall of the software:
Next, I write some Pascal code to prompt the user for a data directory. If an INI file doesn't exist, it will initially supply text based on the default location for the user's application data. If the file does exist, the wizard will use the value it finds in the file instead.
A warning I should point out here is that turned out to be a bit tricky to get working as intended.
Because I want the wizard to prompt the user for a data directory directly after they've been prompted for the program directory, I've learned that program directory constant {app} isn't available yet when this code runs. I need to reach under the hood, and pluck the value out of the running Delphi API code via a call to WizardDirDrive(), which returns whatever the user accepted as the program directory in the install wizard's previous step.
Inno Setup Directory Exists
Finally, whatever the user chose via the scripted code will ned to be stored in this INI file. I add an entry to the [INI] section telling the script to write the DataDirectory value to the INI file:
What Is Install Directory
And there we have it. Inno Setup. It's powerful, it's free, and it allows me to tack hard against default behaviour if I need something non-standard. If you're programming for Windows, and need a a top-notch installer that's free, take it for a spin.