You can use the install actions to run commands before and after the wrapped executable is run. These actions can be any command line, you wish to run. This includes batch files and other scripts with or without parameters.
If you combine this feature with the ability to include other files than the wrapped executable itself, then you can do a wide variety of things. These are some examples:
Add Entries to the Registry
Use regedit.exe and a registry file to modify the registry database. You can read about the command line for the Registration Info Editor at Microsoft’s website.
Run a VB Script
You can launch a VB Script using the cscript.exe or wscript.exe command line syntax. With these scripts you can do virtually anything including accessing databases, files, and folders.
Just like the VB script mentioned above, you can do a lot with access to run Powershell scripts.
When actions are run, the current directory is the folder where the files were unpacked to.
When you specify the command line, you can use macro values that will be substituted with values before the command line is run. These are the available macros:
- – The exit code of the installer executable. This value is not set for the command line that runs before the installation.
- – Full path to the folder were the wrapped files are extracted.
- – This is a number that indicates if the MSI package is run with a user interface or in silent mode. The UI levels are documented by Microsoft in Dev Center.