Step-by-Step Tutorial: Initializing Programs via EXE Setup Files and Command Line Interface
Step-by-Step Tutorial: Initializing Programs via EXE Setup Files and Command Line Interface
Table of Contents
- Introduction
- Registration
- Using Advanced Installer
- GUI
- Working with Projects
- Installer Project
* Product Information
* Resources
* Package Definition
* Install Parameters
* Organization
* Builds
* Configuration Tab
* Edit Metadata
* LZMA Settings
* Edit CAB Settings Dialog
* EXE setup file - EXE Bootstrapper command line
* MSI Summary Information
* Advanced Media Tab
* Mac OS X Tab
* App-V 4.x Tab
* App-V 5.x Tab
* ThinApp Tab
* Configuration Tab
* App Installer Tab
* UWP Bootstrapper Tab
* Build Events Tab
* Optional Package Tab
* Symbol Files Tab
* Analytics
* SCCM
* ActiveSync
* Requirements
* User Interface
* System Changes
* Server
* Custom Behavior - Patch Project
- Merge Module Project
- Updates Configuration Project
- Windows Store App Project
- Modification Package Project
- Optional Package Project
- Windows Mobile CAB Projects
- Visual Studio Extension Project
- Software Installer Wizards - Advanced Installer
- Visual Studio integration
- Alternative to AdminStudio/Wise
- Replace Wise
- Migrating from Visual Studio Installer
- Keyboard Shortcuts
- Shell Integration
- Command Line
- Advanced Installer PowerShell Automation Interfaces
- Features and Functionality
- Tutorials
- Samples
- How-tos
- FAQs
- Windows Installer
- Deployment Technologies
- IT Pro
- MSIX
- Video Tutorials
- Advanced Installer Blog
- Table of Contents
Disclaimer: This post includes affiliate links
If you click on a link and make a purchase, I may receive a commission at no extra cost to you.
Create EXE setup file
Advanced Installer comes with a Setup program which can be used as a Bootstrapper. This is useful if you want to create an EXE installation package or if your package has some prerequisites.
If you build your EXE setup with the installation files outside (MSI, CAB etc.), the Bootstrapper will use an INI file to store its settings. It can also receive command-line options.
Standard command-line switches
The EXE Setup program (EXE Bootstrapper) supports all msiexec command-line options (basically all the command-line parameters you can use for an MSI package). A command-line received by the EXE Bootstrapper will be passed to msiexec when launching the main MSI. This command-line overrides the one specified in the “Install Options” from the Configuration Settings Tab .
“//“ marker
The // marker is automatically replaced by the EXE Bootstrapper with <path_to_msi>. Msiexec command-line parameters need to be appended to this command.
Example of an uninstall command passed to the EXE Setup program:
C:\Setup.exe /x // /l*v install.log
Copy
The command above will be automatically converted by the Bootstrapper to:
msiexec.exe /x C:\Setup.msi /l*v install.log
Copy
The // sequence of characters is not supported when used in a property value set by the Bootstrapper command-line. If you want to use this sequence (for example a URL which starts with “http://“), you can add the | character in front of //. This way, you will have something likehttp:|//.
To learn more about how pass commands to your MSI and MSP packages see the Msiexec page .
Proprietary command-line switches for the EXE Setup
These commands affect only the language selection dialog and the dialogs in the prerequisite wizard. To also affect the MSI package please use the standard MSIEXEC command-line parameters. Note that the MSI parameters must come after the Bootstrapper parameters.
/extract
Extracts the MSI contained by the EXE to the specified location. The full path to an existent folder is required. If the path contains spaces you must enclose it in quotes:
Example
Mypackage.exe /extract “C:\My work”
Copy
This command will extract the Mypackage.msi file in the “My work” folder.
/? and /help
Both these commands will display a help dialog containing the command-line options for the EXE setup.
/exenoui
Launches the EXE setup without UI.
/exebasicui
Launches the EXE setup with basic UI. The UI level set using the above command-line options will overwrite the default UI level specified when the package was built.
/listlangs
Lists the languages supported by the EXE setup.
/exelang
Launches the EXE setup using the specified language. This command-line option will have effect only if the EXE setup was built with the language selection dialog. You can use both a UI level and /exelang command-line options at the same time.
/username
Sets the username used by the proxy server in case the Installer needs Internet access. This command is deprecated, and you should use /proxyusername instead.
/password
Sets the password used by the proxy server in case the Installer needs Internet access. This command was deprecated and you should use /proxypassword instead.
/proxyusername <user_name>
Sets the username used by the proxy server in case the Installer needs Internet access.
/proxypassword
Sets the password used by the proxy server in case the Installer needs Internet access.
/exelog <path_to_log_file>
Creates a log file at the specified path with the specified name. If a path and name are not specified, then the log file will be created next to the EXE installer having the same name as the installer and the extension .log.
/exenoupdates
Using this switch will force the Bootstrapper to cancel/discard the update checks if any is declared in the Updater Page .
/aespassword
Sets the password needed to install an AES encrypted package.
When EXE bootstrapper is launched with wrong value for /aespassword parameter, the EXE exit code is 1.
Example
Mypackage.exe /aespassword:”secret”
Installs the AES encrypted Mypackage.exe using the password “secret” to decrypt the package.
A particular example is installing Multiple Instances Page from the command-line. The possibilities are described in How do I install multiple instances from the command line? article.
/prereqs <prereq_id_list>
Specifies which prerequisites to be installed.
/noprereqs
Skips prerequistes installation.
/newinst <instance_id>
Installs new instance, where <instance_id> is the instance id defined in your project
/upgrdinst <instance_product_code>
Upgrades an installed instance.
/selinst <instance_product_code>
Maintains an installed instance.
instname <new_instance_name>
Changes the instance “Product Name” when installing it.
Options for msiexec.exe on running the MSI package.
command-line switches order
When passing proprietary command-line parameters to an EXE setup, you cannot mix them with the standard MSI ones. The correct order is to first specify the proprietary EXE switches and then the standard MSI switches.
For example, a correct command-line would be:
Setup.exe /exelang 1033 /exenoui /qn /norestart
Copy
as opposed to an incorrect command-line:
Setup.exe /norestart /exelang 1033 /exenoui /qn
Copy
Return code
The EXE Bootstrapper will return:
- -1, when the user presses the “Cancel” button, while installing the prerequisites
- 1, when EXE bootstrapper is launched with wrong value for_/aespassword_ parameter
- otherwise, it will show the code returned by MSIExec.exe after running the main MSI
The Setup EXE provides the MSI it launches with the SETUPEXEDIR property which contains the folder path from where it was executed.
Did you find this page useful?
Please give it a rating:
Thanks!
Report a problem on this page
Information is incorrect or missing
Information is unclear or confusing
Something else
Can you tell us what’s wrong?
Send message
Also read:
- [New] 2024 Approved Logic Pro's Way to Softly Diminish Loud Passages
- [New] 2024 Approved Sharing Stories that Resonate with a Digital Audience YT
- [New] Excellent Collection Top Webcam Grips & Mounts
- [Updated] 2024 Approved Eye of the Tech Giants Leading Screen Capture Apps
- [Updated] In 2024, Post-VLC Era Unveiling New Player Titans
- [Updated] Unparalleled Dramatic Audio Experiences
- A Symphony of Sounds: Taming IRQ Noise
- Adjusting Features in the Modify Element Parameters Panel
- Efficient Querying Techniques with XML Search Parameters for Enhanced Information Extraction
- Elevating Gameplay: Microsoft Edge's Top 7 Features
- Expert Evaluation of the Pioneer BDR-XS06 - A Compact, Powerful Blu-Ray Disc Burning Solution
- Simple Methods to Transform Your Product Images' Background Into Perfect White - No Photoshop Required!
- Step-by-Step Guide: Transforming Your Music Files From 3GA to MP3 Format
- Understanding and Accessing FTP Servers: A Comprehensive Guide
- Title: Step-by-Step Tutorial: Initializing Programs via EXE Setup Files and Command Line Interface
- Author: Charles
- Created at : 2024-10-03 22:11:36
- Updated at : 2024-10-11 06:27:49
- Link: https://fox-tips.techidaily.com/step-by-step-tutorial-initializing-programs-via-exe-setup-files-and-command-line-interface/
- License: This work is licensed under CC BY-NC-SA 4.0.