Actual Installer Help \ Commands
For creating flexible installations, in your Actual Installer project you can specify any custom commands to be executed on user's system.
To add a command go to the System \ Commands tab and click Add.
File - Specify a file to execute or an URL to open.
Parameters - Specify command line parameters / switches to be passed to the file when it is run.
Launch on OS - Specify 32-bit, 64-bit or Any Windows bitness under which the file should be executed.
Show - The window state at startup.
Timing - Specify when the file should be executed: Before Installation, At User Information dialog, At Folder Select dialog, After Installation, Start Uninstallation, Before Uninstallation, After Uninstallation.
Timing Before Installation executes commands when the setup program is launched.
Timing Start Uninstallation executes commands when Uninstaller is launched, but before a message asking user to uninstall.
Timing Before Uninstallation executes commands when Uninstaller is launched, and the user clicks YES when prompting to uninstall.
IMPORTANT: Do not use files from folder <InstallDir> for the Timings Before Installation, At User Information dialog, and At Folder Select dialog because they are not created yet. To be able to execute that files, they have to be located in the <SetupTempDir> folder.
Wait for process to finish - The installation waits for the given file to terminate before continuing. When using this option the setup program will store the exit code of the command in the variable <ExitCode>
Run as admin - The file will be launched with administrator privileges.
NOTE: You don't have to select this option if you already selected the option "Administrator Privileges" (on the General \ Requirements page).
Launch the 'Updater.exe' file in the silent mode (parameter /S):
Windows Command Prompt
Also, it is possible to use the Windows Command Prompt (by executing a file cmd.exe which is located in the system directory of Windows: C:\Windows\System32).
To execute a command you need to launch this cmd.exe file with specific command-line parameters which should begin with /C (executes the specified command-line and then exits). To see the result of the command it should begin with /K. More information here.
To create an empty folder you need to execute:
C:\Windows\System32\cmd.exe /C mkdir "C:\New Folder"
In Actual Installer project you need to specify it as:
Parameters: /C mkdir "C:\New Folder"
Launch on OS: Any
Timing: After Installation
Run as admin: No
IMPORTANT: In the Parameters field all file / folder paths containing spaces must be quoted.
List of useful commands:
Create an empty folder:
mkdir "C:\New Folder"
Delete a file:
del /Q "<InstallDir>\file.exe"
Delete a folder with all files and subfolders:
rmdir /S /Q "C:\Folder"
Change the folder attribute to 'Hide':
attrib +H "<InstallDir>\Folder"
Close / terminate Notepad:
taskkill /F /IM notepad.exe /T
Install MSI package:
msiexec /i "<InstallDir>\File.msi"
Check if the file exists and then rename / move it:
IF EXIST "C:\File.exe" ( MOVE /Y "C:\File.exe" "C:\NewFile.exe")
Import registry keys from a .REG file:
regedit /S "<InstallDir>\file.reg"
Launch a file on Windows 7 only:
/C IF /I <WindowsVersion>==6.1 "<InstallDir>\File.exe"
Variable <WindowsVersion> contains Windows version number:
6.1 Windows 7
6.2 Windows 8
6.3 Windows 8.1
10.0 Windows 10
== means Equal. Compares strings
More info at http://ss64.com/nt/if.html
Run SQL scripts:
Click here for details
Replace installer variables in any file with actual values / paths:
Parameters: specify a file
Set current directory:
Parameters: specify a directory
Condition for command:
If you want to launch a file (or copy, move, etc.) with condition then use the following format:
Parameters: /C IF /I <var1>==<var2> command
If setup language is French then launch File.exe:
Parameters: /C IF /I <Language>==French "<InstallDir>\File.exe"
If language is French then copy file "French.lng" from SetupTempDir to Installation Directory:
Parameters: /C IF /I <Language>==French (COPY /Y "<SetupTempDir>\French.lng" "<InstallDir>\French.lng")
If you want to show a message or halt the installation, use the following format:
File: IF <var1>=<var2>
to show a message:
Parameters: MSG(your message)
to terminate the installation:
Parameters: HALT(your message)
to stop the current action (only for Timing "At User Information dialog" and "At Folder Select dialog"):
Parameters: STOP(your message)
If you want to check an exit code of the command and then show a message. Previous command must be launched with flag "Wait" checked.
File: IF <ExitCode>=1
Parameters: MSG(your message)
Functions to extract file name or directory from a path are described here.