### Logging Command Example Source: https://www.advancedinstaller.com/user-guide/msiexec.html Example command to perform an installation with verbose logging enabled. ```bash msiexec.exe /i "C:\Example.msi" /L*V "C:\package.log" ``` -------------------------------- ### Sample Command Line for Normal Installation Source: https://www.advancedinstaller.com/user-guide/msiexec.html A basic example of how to initiate a normal installation of an MSI package using Msiexec.exe. ```bash msiexec.exe /i "C:\Example.msi" ``` -------------------------------- ### Set Installer Property Value Examples Source: https://www.advancedinstaller.com/user-guide/control-events.html Examples of using the SetProperty control event to assign values to installer properties. ```text [MY_PROPERTY] My Value AI_INSTALL [MY_PROPERTY] [OTHER_PROPERTY] AI_INSTALL [MY_PROPERTY] {} AI_INSTALL ``` -------------------------------- ### Add Folder Command Examples Source: https://www.advancedinstaller.com/user-guide/add-folder.html Examples demonstrating how to add folders to a project using the Advanced Installer command line tool. ```bash AdvancedInstaller.com /edit MyProject.aip /AddFolder APPDIR C:\MyProjFolder ``` ```bash AdvancedInstaller.com /edit MyProject.aip /AddFolder "APPDIR\Parent Folder" "D:\Another Folder" ``` -------------------------------- ### Example: Add File Permission Source: https://www.advancedinstaller.com/user-guide/add-file-permission.html This example demonstrates how to add a 'Full control' permission for a user to a specific file within your project using the Advanced Installer command-line interface. ```bash AdvancedInstaller.com /edit YourProject.aip /AddFilePermission APPDIR\File.txt -username User -full_control ``` -------------------------------- ### Delete File Command Syntax and Examples Source: https://www.advancedinstaller.com/user-guide/del-file.html Provides the command syntax and usage examples for deleting files from Advanced Installer projects. ```APIDOC ## Command Line Usage ### Delete File Command Syntax ``` /DelFile ``` ### Description Deletes a file from the project. ### Parameters #### Path Parameters - **target_file_path** (string) - Required - The relative file path from the project point of view. ### Examples **Standard Project Example:** ``` AdvancedInstaller.com /edit MyProject.aip /DelFile APPDIR\File.txt ``` **WinCE Project Example:** ``` AdvancedInstaller.com /edit MyProject.aip /DelFile %InstallDir%\File.txt ``` ``` -------------------------------- ### Sample Command Line to Prevent Restart Source: https://www.advancedinstaller.com/user-guide/msiexec.html An example command to install an MSI package without forcing a system restart upon completion. ```bash msiexec.exe /i "C:\Example.msi" /norestart ``` -------------------------------- ### Example: Add Directory Search Command Source: https://www.advancedinstaller.com/user-guide/add-dr-locator.html This example demonstrates how to add a directory search command using the Advanced Installer CLI. It specifies the project file, the property name for the search result, the search signature, and the search path and depth. ```bash AdvancedInstaller.com /edit MyProject.aip /AddDrLocator FOLDER_SEARCH_RESULT -signature folder_search -path WindowsVolume -depth 3 ``` -------------------------------- ### Add Temporary Folder Command Example Source: https://www.advancedinstaller.com/user-guide/add-temp-folder.html Demonstrates the practical application of the /AddTempFolder command within an Advanced Installer project file. ```text AdvancedInstaller.com /edit MyProject.aip /AddTempFolder C:\Folder ``` -------------------------------- ### Example: Add Update Dependency using CLI Source: https://www.advancedinstaller.com/user-guide/add-update-dependency.html This example demonstrates how to add an update dependency using the Advanced Installer CLI. Ensure you are in the correct directory or provide the full path to your project file. ```bash AdvancedInstaller.com /edit MyUpdatesConfigurationProject.aip /AddUpdateDependency MyUpdateName UpdateDependency ``` -------------------------------- ### Set Installation Parameters via CLI Source: https://www.advancedinstaller.com/user-guide/tutorial-professional-cli.html Configure installation directories and package type for your installer project using these CLI commands. Specify build name and target paths for application and shortcuts. ```bash "AdvancedInstaller.com" /edit "C:\MyProject\Sample.aip" /SetAppdir -buildname DefaultBuild -path [ProgramFilesFolder][Manufacturer]\[ProductName] ``` ```bash "AdvancedInstaller.com" /edit "C:\MyProject\Sample.aip" /SetShortcutdir -buildname DefaultBuild -path [ProgramMenuFolder][ProductName] ``` ```bash "AdvancedInstaller.com" /edit "C:\MyProject\Sample.aip" /SetPackageType x86 ``` -------------------------------- ### Repair Command Example Source: https://www.advancedinstaller.com/user-guide/msiexec.html Example command to force a repair of all files for a specific product. ```bash msiexec.exe /fa {AAD3D77A-7476-469F-ADF4-04424124E91D} ``` -------------------------------- ### AddUpgradeCode Usage Example Source: https://www.advancedinstaller.com/user-guide/add-upgradecode.html A practical example of applying the AddUpgradeCode command to an existing project file. ```text AdvancedInstaller.com /edit MyProject.aip /AddUpgradeCode {E147398F-454D-4DF7-9E62-91647934B9E0} -min_ver 1.0 -max_ver 3.0 -include_max_ver -exclude_lang 1034 -property_name MY_UPGRADE -enable_migrate -continue_on_failure ``` -------------------------------- ### Delete Prerequisite Command Example Source: https://www.advancedinstaller.com/user-guide/del-prerequisite.html Example usage of the /DelPrerequisite command within an Advanced Installer project edit session. ```text AdvancedInstaller.com /edit MyProject.aip /DelPrerequisite DirectX ``` -------------------------------- ### Add Update Configuration Replacement Examples Source: https://www.advancedinstaller.com/user-guide/add-update-replacement.html Examples demonstrating how to use the command to replace a specific update or all updates. ```text AdvancedInstaller.com /edit MyUpdatesConfigurationProject.aip /AddUpdateReplacement MyUpdateName UpdateToReplace ``` ```text AdvancedInstaller.com /edit MyUpdatesConfigurationProject.aip /AddUpdateReplacement MyUpdateName -replace_all ``` -------------------------------- ### Create Shortcut for WinCE Projects Source: https://www.advancedinstaller.com/user-guide/create-shortcut.html This example demonstrates creating a shortcut for WinCE projects, specifying configurations using the -configs parameter. ```bash AdvancedInstaller.com /edit MyProject.aip /NewShortcut -name MyShortcut -dir %CE3% -target %InstallDir%\MyApplication.exe -configs Default;Configuration1 ``` -------------------------------- ### Example: Delete Patch Family Source: https://www.advancedinstaller.com/user-guide/del-msp-family.html This example demonstrates how to delete a patch family named 'MyTestFamily' from a project file 'MyMspProject.aip' using the Advanced Installer command-line tool. ```bash AdvancedInstaller.com /edit MyMspProject.aip /DelMspFamily "MyTestFamily" ``` -------------------------------- ### Add SQL Database Server Command Example Source: https://www.advancedinstaller.com/user-guide/add-sql-database-server.html An example of using the command to add a Predefined SQL database to an existing project file. ```text AdvancedInstaller.com /edit "D:\Your Application.aip" /AddSqlDatabaseServer -name YourDatabase -type Predefined ``` -------------------------------- ### Example: Deleting a Patch Target Image Source: https://www.advancedinstaller.com/user-guide/del-msp-target.html This example demonstrates how to use the Advanced Installer command-line tool to edit a patch project and delete a specific target image. ```bash AdvancedInstaller.com /edit MyMspProject.aip /DelMspTarget "MyTargetImage" ``` -------------------------------- ### Create a new project via command line Source: https://www.advancedinstaller.com/user-guide/command-line.html Use this syntax to initialize a new project file. The -template parameter cannot be used alongside -type or -lang. ```text AdvancedInstaller.com /newproject { [-type ] [-lang ] } ``` -------------------------------- ### Add Component Search Command Example Source: https://www.advancedinstaller.com/user-guide/add-comp-locator.html Demonstrates how to invoke the command line interface to add a component search to a specific project file. ```text AdvancedInstaller.com /edit MyProject.aip /AddCompLocator COMP_SEARCH_RESULT -signature comp_search -compid {E445FA46-5308-4497-8CED-00C9DADEFD34} ``` -------------------------------- ### Delete Launch Conditions Command Examples Source: https://www.advancedinstaller.com/user-guide/del-os-lc.html Examples demonstrating how to remove entire architectures or specific operating systems from a project file. ```bash AdvancedInstaller.com /edit MyProject.aip /DelOsLc -buildname DefaultBuild -arch x86 ``` ```bash AdvancedInstaller.com /edit MyProject.aip /DelOsLc -buildname DefaultBuild -arch x86 -os_list "Windows 8.1 x86" ``` ```bash AdvancedInstaller.com /edit MyProject.aip /DelOsLc -buildname DefaultBuild -arch x86 -os_list "Windows 8.1 x86,Windows 10 x86" ``` -------------------------------- ### AES Password Usage Source: https://www.advancedinstaller.com/user-guide/exe-setup-file.html Example of providing a password to decrypt an AES encrypted package during installation. ```shell Mypackage.exe /aespassword:"secret" ``` -------------------------------- ### Control Panel Applet Configuration Examples Source: https://www.advancedinstaller.com/user-guide/cplapplet.html Examples of configuring the Target and Command Line fields for Control Panel applets using Formatted Type strings. ```text Target: [WindowsFolder]notepad.exe ``` ```text Target: [#yourfile] Command Line: /out "[APPDIR]OutputFolder" ``` ```text Target: [#Readme.html] ``` -------------------------------- ### Example: Add Auto Close Applications Source: https://www.advancedinstaller.com/user-guide/add-auto-close-applications.html This example demonstrates how to use the Advanced Installer CLI to add an auto-close application to an updates configuration project. It specifies the project file, the update name, the application path, its window prefix, and restart options. ```bash AdvancedInstaller.com /edit D:\MyUpdatesConfigurationProject.aip /UpdateAddAutoClose MyUpdateName -app_path "D:\Sideloading.msi" -window_prefix "Sideloading App" -always_restart -restart_commandline "/qn" ``` -------------------------------- ### Build Only Bundled Package Command Example Source: https://www.advancedinstaller.com/user-guide/build-jre-only.html An example of using the command-line interface to edit a project and set the build option. ```text AdvancedInstaller.com /edit MyProject.aip /SetBuildJreOnly ``` -------------------------------- ### Create Project Instance Source: https://www.advancedinstaller.com/user-guide/tutorial-powershell-commands-installation.html Initializes a new project instance with a specified license type. ```PowerShell $project = $advinst.CreateProjects(“professional”) ``` -------------------------------- ### Displaying Product Code via MessageBox Source: https://www.advancedinstaller.com/user-guide/create-dot-net-ca.html Example of showing a message box during installation to display the current product code retrieved from the MsiSession. ```csharp MessageBox.Show("This is the product code: " + session.GetProperty("ProductCode")); ``` -------------------------------- ### Example AIC Command File Source: https://www.advancedinstaller.com/user-guide/command-line.html A sample AIC file demonstrating version setting, file addition, property modification, and build commands. The file must start with ';aic' and be saved with appropriate encoding. ```text ;aic SetVersion 1.2 AddFile APPDIR\MyFolder C:\Folder\File.txt AddFile APPDIR\MyFolder “%SAMPLE%File.txt“ SetProperty TESTPROP="TestValue" Save Rebuild ``` -------------------------------- ### Build a project via command line Source: https://www.advancedinstaller.com/user-guide/command-line.html Builds an MSI from a project file. If no specific build is provided, all builds are performed. ```text AdvancedInstaller.com /build { [-buildslist ] | [-configurationslist ] } ``` -------------------------------- ### Implement Java Service Methods Source: https://www.advancedinstaller.com/user-guide/tutorial-java-service.html For a Java application to function as a service, its main class must implement `main()` to start and `stop()` to halt the service. If `stop()` is omitted, Advanced Installer's launcher uses `System.exit()`. ```java public static void main(String argv[]) { // implementation goes here } public static void stop() { // implementation goes here } ``` -------------------------------- ### Msiexec.exe - Install Options Source: https://www.advancedinstaller.com/user-guide/msiexec.html Control the type of installation (install, uninstall, administrative install, advertise) using these switches. ```APIDOC ## Msiexec.exe - Install Options ### Description Specifies the primary action to be performed on the installation package, such as installing, uninstalling, or advertising. ### Method Command Line Execution ### Endpoint N/A ### Parameters #### Path Parameters None #### Query Parameters None #### Request Body None ### Request Example ``` msiexec.exe [/i][/a][/j{u|m|/g|/t}][/x] ``` ### Switches * **/i** - Normal installation. * **/a** - Administrative install (creates an image on a network share). * **/j** - Advertise the product: * **u** - Advertise to the current user. * **m** - Advertise to all users. * **/g** - The language identifier for the advertised package. * **/t** - Apply a transform to the advertised package. * **/x** - Uninstall the package. ### Sample Command Line ``` msiexec.exe /i "C:\Example.msi" ``` ``` -------------------------------- ### Configure Product Details Source: https://www.advancedinstaller.com/user-guide/tutorial-powershell-commands-installation.html Sets the metadata for the installer project including product name, publisher, and version. ```PowerShell $project.ProductDetails.Name = “ My Product” $project.ProductDetails.Publisher= “ My Company” $project.ProductDetails.Version= “1.0.1” ``` -------------------------------- ### Msiexec.exe Install Options Source: https://www.advancedinstaller.com/user-guide/msiexec.html Control the type of installation or uninstallation performed by Msiexec.exe. Options include normal installation, administrative installation for network deployment, advertising the product, and uninstallation. ```bash msiexec.exe [/i][/a][/j{u|m|/g|/t}][/x] ```