/build/static/layout/Breadcrumb_cap_w.png

Documentation Update

Hi,

Attached please find an update for our page Inno Setup Command Line Switches and Exit Codes. The file upload feature appears disabled, so I'm attaching the html code.

Friendly Greetings,
Lawrence Mayer

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
The following documentation comes from ISetup.chm distributed with <a href="http://www.jrsoftware.org/isinfo.php">Inno Setup 5.1.14</a> (2007-08-07).<br><br>Inno Setup packages can be unpacked with <a href="http://innounp.sourceforge.net/">Inno Setup Unpacker</a>. (Beta version which can unpack Inno Setup 5.1.14 packages available <a href="http://sourceforge.net/forum/forum.php?thread_id=1802239&forum_id=353235">here</a>.)<br><br>More information about Inno Setup, other installers, and unattended installation <a href="http://unattended.sourceforge.net/installers.php#inno">here</a> and <a href="http://unattended.msfn.org/unattended.xp/view/web/39/">here</a>.<br><br><br>
<title>Setup Command Line Parameters</title>
<STYLE type=text/css>
<!--
BODY {
font: small arial, sans-serif;
margin: 0;
}
PRE, TT {
font: small "courier new", monospace;
}
P, H1, H2, H3, H4, H5, BLOCKQUOTE, PRE, FORM, OL, UL, LI, DL, DD, TABLE, .examplebox, DIV.margined {
/* only the end of paragraphs etc. has a margin */
margin-top: 0;
margin-bottom: 0.6em;
}
UL, DD {
/* specify both of these for firefox compat. */
margin-left: 0;
padding-left: 2em;
}
TABLE {
/* equivalent of cellspacing="0" */
border-collapse: collapse;
}
TD {
/* equivalent of cellpadding="0" */
padding: 0;
/* note: "baseline" is broken on IE6; it only aligns correctly when there's
a single line of text, and that text is directly inside the <TD> tag
(not inside a <DIV>). otherwise it behaves more like "top".
(firefox 1.5 and opera 9 don't have this problem) */
vertical-align: baseline;
}
A:link, A:visited, A:active {
color: #008000;
}

.small {
/* what we want is an 8pt font. 8pt/10pt = 80%, but on firefox that
actually creates a font smaller than 8pt, so use 82% */
font-size: 82%;
}
.heading {
margin-top: 0.6em;
font-size: 120%;
font-weight: bold;
}
.notopmargin {
margin-top: 0;
}
.indent {
margin-left: 2em;
}
PRE.nomargin {
margin: 0;
}
LI.compact {
margin-bottom: 2px;
}

.topicheading {
background: ButtonFace;
color: WindowText;
padding: 5px 8px;
margin: 0;
border-bottom: 1px solid black;
font-size: 120%;
font-weight: bold;
}
.topicbody {
padding: 8px;
}

.examplebox {
background: #f8f8f8;
color: black;
padding: 4px;
border: 1px solid #e0e0e0;
/* on IE6, if the content of the box is wider than the page,
the width of the box is increased. on firefox 1.5, by default
the box width stays the same, and the content is drawn outside
the box. that looks ugly. "overflow: auto" tells it to put a
scroll bar on the box when the content is too wide. (IE6
apparently ignores "overflow: auto", at least here.) */
overflow: auto;
}
.exampleheader {
font-size: 82%;
font-weight: bold;
margin-bottom: 0.6em;
}


DT.paramlist {
margin-bottom: 0.6em;
}
DD.paramlist {
/* give a little extra spacing between items */
margin-bottom: 1.2em;
}

DT.flaglist {
font-weight: bold;
}

TD.cellleft {
white-space: nowrap;
}
TD.cellright {
padding-left: 2em;
}

TABLE.setuphdr {
margin: 0;
}
TD.setuphdrl {
font-weight: bold;
white-space: nowrap;
}
TD.setuphdrr {
padding-left: 1em;
}
-->
</STYLE>
</head>
<body>
<div id="topic_setupcmdline">
<h1 class="topicheading">Setup Command Line Parameters</h1>
<div class="topicbody">

<p>The Setup program accepts optional command line parameters. These can be useful to system administrators, and to other programs calling the Setup program.</p>

<dl>

<dt><b>/SP-</b></dt>
<dd>
<p>Disables the <i>This will install... Do you wish to continue?</i> prompt at the beginning of Setup. Of course, this will have no effect if the <tt>DisableStartupPrompt</tt> <tt>[Setup]</tt> section directive was set to <tt>yes</tt>.</p>
</dd>

<dt><b>/SILENT, /VERYSILENT</b></dt>
<dd>
<p>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).</p>
<p>If a restart is necessary and the '/NORESTART' command isn't used (see below) and Setup is silent, it will display a <i>Reboot now?</i> message box. If it's very silent it will reboot without asking.</p>
</dd>

<dt><b>/SUPPRESSMSGBOXES</b></dt>
<dd>
<p>Instructs Setup to suppress message boxes. Only has an effect when combined with '/SILENT' and '/VERYSILENT'.</p>
<p>The default response in situations where there's a choice is:</p>
<ul>
<li class="compact">Yes in a 'Keep newer file?' situation.</li>
<li class="compact">No in a 'File exists, confirm overwrite.' situation.</li>
<li class="compact">Abort in Abort/Retry situations.</li>
<li class="compact">Cancel in Retry/Cancel situations.</li>
<li class="compact">Yes (=continue) in a DiskSpaceWarning/DirExists/DirDoesntExist/NoUninstallWarning/ExitSetupMessage/ConfirmUninstall situation.</li>
<li class="compact">Yes (=restart) in a FinishedRestartMessage/UninstalledAndNeedsRestart situation.</li>
</ul>
<p>5 message boxes are not suppressible:</p>
<ul>
<li class="compact">The About Setup message box.</li>
<li class="compact">The Exit Setup? message box.</li>
<li class="compact">The FileNotInDir2 message box displayed when Setup requires a new disk to be inserted and the disk was not found.</li>
<li class="compact">Any (error) message box displayed before Setup (or Uninstall) could read the command line parameters.</li>
<li class="compact">Any message box displayed by [Code] support function <tt>MsgBox</tt>.</li>
</ul>
</dd>

<dt><b>/LOG</b></dt>
<dd>
<p>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.</p>
<p>The log file is created with a unique name based on the current date. (It will not overwrite or append to existing files.)</p>
<p>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.</p>
</dd>

<dt><b>/LOG="<i>filename</i>"</b></dt>
<dd>
<p>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.</p>
</dd>

<dt><b>/NOCANCEL</b></dt>
<dd>
<p>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'.</p>
</dd>

<dt><b>/NORESTART</b></dt>
<dd>
<p>Instructs Setup not to reboot even if it's necessary.</p>
</dd>

<dt><b>/RESTARTEXITCODE=<i>exit code</i></b></dt>
<dd>
<p>Specifies the custom exit code that Setup is to return when a restart is needed. Useful along with '/NORESTART'. Also see <a href="topic_setupexitcodes.htm">Setup Exit Codes</a>.</p>
</dd>

<dt><b>/LOADINF="<i>filename</i>"</b></dt>
<dd>
<p>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.</p>
<p>Don't forget to use quotes if the filename contains spaces.</p>
</dd>

<dt><b>/SAVEINF="<i>filename</i>"</b></dt>
<dd>
<p>Instructs Setup to save installation settings to the specified file.</p>
<p>Don't forget to use quotes if the filename contains spaces.</p>
</dd>

<dt><b>/LANG=<i>language</i></b></dt>
<dd>
<p>Specifies the language to use. <i>language</i> specifies the internal name of the language as specified in a [Languages] section entry.</p>
<p>When a valid /LANG parameter is used, the <i>Select Language</i> dialog will be suppressed.</p>
</dd>

<dt><b>/DIR="<i>x</i>:\<i>dirname</i>"</b></dt>
<dd>
<p>Overrides the default directory name displayed on the <i>Select Destination Location</i> wizard page. A fully qualified pathname must be specified.</p>
</dd>

<dt><b>/GROUP="<i>folder name</i>"</b></dt>
<dd>
<p>Overrides the default folder name displayed on the <i>Select Start Menu Folder</i> wizard page. If the <tt>[Setup]</tt> section directive <tt>DisableProgramGroupPage</tt> was set to <tt>yes</tt>, this command line parameter is ignored.</p>
</dd>

<dt><b>/NOICONS</b></dt>
<dd>
<p>Instructs Setup to initially check the <i>Don't create a Start Menu folder</i> check box on the <i>Select Start Menu Folder</i> wizard page.</p>
</dd>

<dt><b>/TYPE=<i>type name</i></b></dt>
<dd>
<p>Overrides the default <a href="topic_typessection.htm">setup type</a>.</p>
<p>If the specified type exists and isn't a custom type, then any /COMPONENTS parameter will be ignored.</p>
</dd>

<dt><b>/COMPONENTS="<i>comma separated list of component names</i>"</b></dt>
<dd>
<p>Overrides the default <a href="topic_componentssection.htm">component</a> settings. Using this command line parameter causes Setup to automatically select a custom type. If no custom type is defined, this parameter is ignored.</p>
<p>Only the specified components will be selected; the rest will be deselected.</p>
<p>If a component name is prefixed with a "*" character, any child components will be selected as well (except for those that include the <tt>dontinheritcheck</tt> flag). If a component name is prefixed with a "!" character, the component will be deselected.</p>
<p>This parameter does not change the state of components that include the <tt>fixed</tt> flag.</p>
<div class="examplebox">
<div class="exampleheader">Example:</div>
Deselect all components, then select the "help" and "plugins" components:<br/>
/COMPONENTS="help,plugins"
</div>
<div class="examplebox">
<div class="exampleheader">Example:</div>
Deselect all components, then select a parent component and all of its children with the exception of one:<br/>
/COMPONENTS="*parent,!parent\child"
</div>
</dd>

<dt><b>/TASKS="<i>comma separated list of task names</i>"</b></dt>
<dd>
<p>Specifies a list of <a href="topic_taskssection.htm">tasks</a> that should be initially selected.</p>
<p>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.</p>
<p>If a task name is prefixed with a "*" character, any child tasks will be selected as well (except for those that include the <tt>dontinheritcheck</tt> flag). If a task name is prefixed with a "!" character, the task will be deselected.</p>
<div class="examplebox">
<div class="exampleheader">Example:</div>
Deselect all tasks, then select the "desktopicon" and "fileassoc" tasks:<br/>
/TASKS="desktopicon,fileassoc"
</div>
<div class="examplebox">
<div class="exampleheader">Example:</div>
Deselect all tasks, then select a parent task and all of its children with the exception of one:<br/>
/TASKS="*parent,!parent\child"
</div>
</dd>

<dt><b>/MERGETASKS="<i>comma separated list of task names</i>"</b></dt>
<dd>
<p>Like the /TASKS parameter, except the specified tasks will be merged with the set of tasks that would have otherwise been selected by default.</p>
<p>If <a href="topic_setup_useprevioustasks.htm">UsePreviousTasks</a> is set to <tt>yes</tt>, the specified tasks will be selected/deselected after any previous tasks are restored.</p>
<div class="examplebox">
<div class="exampleheader">Example:</div>
Keep the default set of selected tasks, but additionally select the "desktopicon" and "fileassoc" tasks:<br/>
/MERGETASKS="desktopicon,fileassoc"
</div>
<div class="examplebox">
<div class="exampleheader">Example:</div>
Keep the default set of selected tasks, but deselect the "desktopicon" task:<br/>
/MERGETASKS="!desktopicon"
</div>
</dd>

<dt><b>/PASSWORD=<i>password</i></b></dt>
<dd>
<p>Specifies the password to use. If the <tt>[Setup]</tt> section directive <tt>Password</tt> was not set, this command line parameter is ignored.</p>
<p>When an invalid password is specified, this command line parameter is also ignored.</p>
</dd></dl></div>
<P> </P>
<div id="topic_setupexitcodes">
<h1 class="topicheading">Setup Exit Codes</h1>
<div class="topicbody">

<p>Beginning with Inno Setup 3.0.3, the Setup program may return one of the following exit codes:</p>

<table>

<tr>
<td class="cellleft"><b>0</b></td>
<td class="cellright">
<p>Setup was successfully run to completion.</p>
</td>
</tr>

<tr>
<td class="cellleft"><b>1</b></td>
<td class="cellright">
<p>Setup failed to initialize.</p>
</td>
</tr>

<tr>
<td class="cellleft"><b>2</b></td>
<td class="cellright">
<p>The user clicked Cancel in the wizard before the actual installation started, or chose "No" on the opening "This will install..." message box.</p>
</td>
</tr>

<tr>
<td class="cellleft"><b>3</b></td>
<td class="cellright">
<p>A fatal error occurred while preparing to move to the next installation phase (for example, from displaying the pre-installation wizard pages to the actual installation process). This should never happen except under the most unusual of circumstances, such as running out of memory or Windows resources.</p>
</td>
</tr>

<tr>
<td class="cellleft"><b>4</b></td>
<td class="cellright">
<p>A fatal error occurred during the actual installation process.</p>
<p><i>Note:</i> Errors that cause an Abort-Retry-Ignore box to be displayed are not fatal errors. If the user chooses <i>Abort</i> at such a message box, exit code 5 will be returned.</p>
</td>
</tr>

<tr>
<td class="cellleft"><b>5</b></td>
<td class="cellright">
<p>The user clicked Cancel during the actual installation process, or chose <i>Abort</i> at an Abort-Retry-Ignore box.</p>
</td>
</tr>

<tr>
<td class="cellleft"><b>6</b></td>
<td class="cellright">
<p>The Setup process was forcefully terminated by the debugger (<i>Run | Terminate</i> was used in the IDE).</p>
</td>
</tr>

</table>

<p>Before returning an exit code of 1, 3, or 4, an error message explaining the problem will normally be displayed.</p>

<p>Future versions of Inno Setup may return additional exit codes, so applications checking the exit code should be programmed to handle unexpected exit codes gracefully. Any non-zero exit code indicates that Setup was not run to completion.</p></div>
<P> </P>
<div id="topic_uninstcmdline">
<h1 class="topicheading">Uninstaller Command Line Parameters</h1>
<div class="topicbody">

<p>The uninstaller program (unins???.exe) accepts optional command line parameters. These can be useful to system administrators, and to other programs calling the uninstaller program.</p>

<dl>

<dt><b>/SILENT, /VERYSILENT</b></dt>
<dd>
<p>When specified, the uninstaller will not ask the user for startup confirmation or display a message stating that uninstall is complete. Shared files that are no longer in use are deleted automatically without prompting. Any critical error messages will still be shown on the screen. When '/VERYSILENT' is specified, the uninstallation progress window is not displayed.</p>
<p>If a restart is necessary and the '/NORESTART' command isn't used (see below) and '/VERYSILENT' is specified, the uninstaller will reboot without asking.</p>
</dd>

<dt><b>/SUPPRESSMSGBOXES</b></dt>
<dd>
<p>Instructs the uninstaller to suppress message boxes. Only has an effect when combined with '/SILENT' and '/VERYSILENT'. See '/SUPPRESSMSGBOXES' under <a href="topic_setupcmdline.htm">Setup Command Line Parameters</a> for more details.</p>
</dd>

<dt><b>/LOG</b></dt>
<dd>
<p>Causes Uninstall to create a log file in the user's TEMP directory detailing file uninstallation and [UninstallRun] actions taken during the uninstallation process. This can be a helpful debugging aid.</p>
<p>The log file is created with a unique name based on the current date. (It will not overwrite or append to existing files.)</p>
<p>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.</p>
</dd>

<dt><b>/LOG="<i>filename</i>"</b></dt>
<dd>
<p>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, Uninstall will abort with an error message.</p>
</dd>

<dt><b>/NORESTART</b></dt>
<dd>
<p>Instructs the uninstaller not to reboot even if it's necessary.</p></dd></dl></div>
<P> </P>
<div id="topic_uninstexitcodes">
<h1 class="topicheading">Uninstaller Exit Codes</h1>
<div class="topicbody">

<p>Beginning with Inno Setup 4.0.8, the uninstaller will return a non-zero exit code if the user cancels or a fatal error is encountered. Programs checking the exit code to detect failure should not check for a specific non-zero value; any non-zero exit code indicates that the uninstaller was not run to completion.</p>

<p>Note that at the moment you get an exit code back from the uninstaller, some code related to uninstallation might still be running. Because Windows doesn't allow programs to delete their own EXEs, the uninstaller creates and spawns a copy of itself in the TEMP directory. This "clone" performs the actual uninstallation, and at the end, terminates the original uninstaller EXE (at which point you get an exit code back), deletes it, then displays the "uninstall complete" message box (if it hasn't been suppressed with /SILENT or /VERYSILENT).</p></div>
</body>
</html>

0 Comments   [ + ] Show comments

Answers (0)

Be the first to answer this question

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ