CHMlib Logo Leading Translation Management System for Translation Agencies, Top Translation Management Software for Freelance Translators, Time Tracking Software, Word Count, Character Count and Line Count Software, Computer Assisted Translation Tool for Easy Word Count, Clipboard Character Count Software, User-Friendly Translation Memory Software, Terminology Management Software, Terminology Management Server, Microsoft Glossary Software, Dictionary of Acronyms, Social Network for Translators and Translation Agencies, Acronyms and Abbreviations Search Engine, Russian Translation Lab, Ukrainian Translation Lab.
You are reading help file online using chmlib.com
CrisisHelper - First Aid in Tough Times of World Economic Crisis


[Run] & [UninstallRun] sections

The [Run] section is optional, and specifies any number of programs to execute after the program has been successfully installed, but before the Setup program displays the final dialog. The [UninstallRun] section is optional as well, and specifies any number of programs to execute as the first step of uninstallation. Both sections share an identical syntax, except where otherwise noted below.

Programs are executed in the order they appear in the script. By default, when processing a [Run]/[UninstallRun] entry, Setup/Uninstall will wait until the program has terminated before proceeding to the next one, unless the nowait, shellexec, or waituntilidle flags are used.

Note that by default, if a program executed in the [Run] section queues files to be replaced on the next reboot (by calling MoveFileEx or by modifying wininit.ini), Setup will detect this and prompt the user to restart the computer at the end of installation. If you don't want this, set the RestartIfNeededByRun directive to no.

The following is an example of a [Run] section.

[Run]
Filename: "{app}\INIT.EXE"; Parameters: "/x"
Filename: "{app}\README.TXT"; Description: "View the README file"; Flags: postinstall shellexec skipifsilent
Filename: "{app}\MYPROG.EXE"; Description: "Launch application"; Flags: postinstall nowait skipifsilent unchecked

The following is a list of the supported parameters:

Filename  (Required)

The program to execute, or file/folder to open. If Filename is not an executable (.exe or .com) or batch file (.bat or .cmd), you must use the shellexec flag on the entry. This parameter can include constants.

Example:
Filename: "{app}\INIT.EXE"
Description

Valid only in a [Run] section. The description of the entry, which can include constants. This description is used for entries with the postinstall flag. If the description is not specified for an entry, Setup will use a default description. This description depends on the type of the entry (normal or shellexec).

Example:
Description: "View the README file"
Parameters

Optional command line parameters for the program, which can include constants.

Example:
Parameters: "/x"
WorkingDir

The directory in which the program is started from. If this parameter is not specified or is blank, it uses the directory from the Filename parameter; if Filename does not include a path, it will use a default directory. This parameter can include constants.

Example:
WorkingDir: "{app}"
StatusMsg

Valid only in a [Run] section. Determines the message displayed on the wizard while the program is executed. If this parameter is not specified or is blank, a default message of "Finishing installation..." will be used. This parameter can include constants.

Example:
StatusMsg: "Installing BDE..."
RunOnceId

Valid only in an [UninstallRun] section. If the same application is installed more than once, "run" entries will be duplicated in the uninstall log file. By assigning a string to RunOnceId, you can ensure that a particular [UninstallRun] entry will only be executed once during uninstallation. For example, if two or more "run" entries in the uninstall log have a RunOnceId setting of "DelService", only the latest entry with a RunOnceId setting of "DelService" will be executed; the rest will be ignored. Note that RunOnceId comparisons are case-sensitive.

Example:
RunOnceId: "DelService"
Flags

This parameter is a set of extra options. Multiple options may be used by separating them by spaces. The following options are supported:

hidewizard

If this flag is specified, the wizard will be hidden while the program is running.

nowait

If this flag is specified, it will not wait for the process to finish executing before proceeding to the next [Run] entry, or completing Setup. Cannot be combined with waituntilidle or waituntilterminated.

postinstall

Valid only in an [Run] section. Instructs Setup to create a checkbox on the Setup Completed wizard page. The user can uncheck or check this checkbox and thereby choose whether this entry should be processed or not. Previously this flag was called showcheckbox.

If Setup has to restart the user's computer (as a result of installing a file with the flag restartreplace or if the AlwaysRestart [Setup] section directive is yes), there will not be an opportunity for the checkbox to be displayed and therefore the entry will never be processed.

The isreadme flag for entries in the [Files] section is now obsolete. If the compiler detects a entry with an isreadme flag, it strips the isreadme flag from the [Files] entry and inserts a generated [Run] entry at the head of the list of [Run] entries. This generated [Run] entry runs the README file and has flags shellexec, skipifdoesntexist, postinstall and skipifsilent.

runhidden

If this flag is specified, it will launch the program in a hidden window. Never use this flag when executing a program that may prompt for user input.

runmaximized

If this flag is specified, it will launch the program or document in a maximized window.

runminimized

If this flag is specified, it will launch the program or document in a minimized window.

shellexec

This flag is required if Filename is not a directly executable file (an .exe or .com file). When this flag is set, Filename can be a folder or any registered file type -- including .chm, .doc, and so on. The file will be opened with the application associated with the file type on the user's system, the same way it would be if the user double-clicked the file in Explorer.

By default, when the shellexec flag is used it will not wait until the spawned process terminates. If you need that, you must add the flag waituntilterminated. Note that it cannot and will not wait if a new process isn't spawned -- for example, if Filename specifies a folder.

skipifdoesntexist

If this flag is specified in the [Run] section, Setup won't display an error message if Filename doesn't exist.

If this flag is specified in the [UninstallRun] section, the uninstaller won't display the "some elements could not be removed" warning if Filename doesn't exist.

When this flag is used, Filename must be an absolute path.

skipifnotsilent

Valid only in an [Run] section. Instructs Setup to skip this entry if Setup is not running (very) silent.

skipifsilent

Valid only in an [Run] section. Instructs Setup to skip this entry if Setup is running (very) silent.

unchecked

Valid only in an [Run] section. Instructs Setup to initially uncheck the checkbox. The user can still check the checkbox if he/she wishes to process the entry. This flag is ignored if the postinstall flag isn't also specified.

waituntilidle

If this flag is specified, it will wait until the process is waiting for user input with no input pending, instead of waiting for the process to terminate. (This calls the WaitForInputIdle Win32 function.) Cannot be combined with nowait or waituntilterminated.

waituntilterminated

If this flag is specified, it will wait until the process has completely terminated. Note that this is the default behavior (i.e. you don't need to specify this flag) unless you're using shellexec flag, in which case you do need to specify this flag if you want it to wait. Cannot be combined with nowait or waituntilidle.

Example:
Flags: postinstall nowait skipifsilent

Components and Tasks Parameters

Common Parameters



You are reading help file online using chmlib.com

If you want your help file to be removed or added please send e-mail to chmlibcom@gmail.com
Partner sites: Logo Design, Simple Anti-Crisis Accounting Software, Voice Search for Web