Edit MSI packages using Command Line
The following article uses options that are available starting with the Architect edition and project type.
Our MSI Quick Edit Mode feature can also be used without Advanced Installer GUI. The supported edit operations can be performed from the Advanced Installer CLI as well. The command line syntax will be the same with the one used for editing an .AIP Project, with the difference that the <project_file_path> will point to the .MSI file.
This article will present the most common scenarios for editing an MSI package using Command Line.
1. Files and Folders commands
1.1 Add File Command
The syntax is similar with the one used for Add File Command Option used for .AIP projects.
Example:
AdvancedInstaller.com /edit setup.msi /AddFile APPDIR C:\File.txt
1.2 Delete File Command
The syntax is similar with the one used for Delete File Command Option used for .AIP projects.
Example:
AdvancedInstaller.com /edit setup.msi /DelFile APPDIR\File.txt
1.3 Add Folder Command
The syntax is similar with the one used for Add Folder Command Option used for .AIP projects.
Example:
AdvancedInstaller.com /edit setup.msi /AddFolder "APPDIR\Parent Folder" "D:\Another Folder"
1.4 New Shortcut Command
The syntax is similar with the one used for New Shortcut Command Option used for .AIP projects.
Internal Shortcut example:
AdvancedInstaller.com /edit setup.msi /NewShortcut -name MyShortcut -dir DesktopFolder -target APPDIR\MyApplication.exe -arg """C:\My Arguments Folder\MyArgFile.arg"" /AppArg" -icon C:\ShIcon.ico
External shortcut example:
AdvancedInstaller.com /edit setup.msi /NewShortcut -name MyShortcut -dir DesktopFolder -target [WindowsVolume]MyApplication.exe -arg /AppArg -icon C:\ShIcon.ico
1.5 Delete Shortcut Command
The syntax is similar with the one used for Delete Shortcut Command Option used for .AIP projects.
Example:
AdvancedInstaller.com /edit setup.msi /DelShortcut -name MyShortcut -dir DesktopFolder
2. Registry Commands
2.1 New Registry Entry Command
The syntax is similar with the one used for New Registry Entry Command Option used for .AIP projects.
Creating a new Registry Key example:
AdvancedInstaller.com /edit setup.msi /NewReg -RegKey HKUD\Software\[Manufacturer]\[ProductName] \MyRegkey\*
Creating a new Registry value example:
AdvancedInstaller.com /edit setup.msi /NewReg -RegValue HKUD\Software\MyKey\MyValue -Data #x100
2.2 Add Registry Entry Command
The syntax is similar with the one used for Add Registry Entry Command Option used for .AIP projects.
Example:
AdvancedInstaller.com /edit setup.msi /AddReg HKLM\Software\LocalKey HKUD\Software\MyKey
2.3 Delete Registry Entry Command
The syntax is similar with the one used for Delete Registry Entry Command Option used for .AIP projects.
Example:
AdvancedInstaller.com /edit setup.msi /DelReg -RegKey HKUD\Software\MyKey
2.4 Import Reg File Command
The syntax is similar with the one used for Import Reg File Command Option used for .AIP projects.
Example:
AdvancedInstaller.com /edit setup.msi /ImportRegFile C:\Registration_File.reg
3. Other Package Commands
3.1 Set Version Command
The syntax is similar with the one used for Set Version Command Option used for .AIP projects.
Example:
AdvancedInstaller.com /edit setup.msi /SetVersion 1.2
3.2 Set Product Code Command
The syntax is similar with the one used for Set Product Code Command Option used for .AIP projects.
Example:
AdvancedInstaller.com /edit setup.msi /SetProductCode -langid 1033 -guid {5EE1BA21-6526-4859-9C64-9CE2777C45CA}
3.3 Set Property Command
The syntax is similar with the one used for Set Property Command Option used for .AIP projects.
Example:
AdvancedInstaller.com /edit setup.msi /SetProperty PROPERTY="Value"
3.4 Delete Property Command
The syntax is similar with the one used for Delete Property Command Option used for .AIP projects.
Example:
AdvancedInstaller.com /edit setup.msi /DelProperty PROPERTY