Edit MSI packages using Command Line

ImportantThe 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 commandsCopy link to this sectionLink to this section copied!

1.1 Add File CommandCopy link to this sectionLink to this section copied!

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 CommandCopy link to this sectionLink to this section copied!

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 CommandCopy link to this sectionLink to this section copied!

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 CommandCopy link to this sectionLink to this section copied!

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 CommandCopy link to this sectionLink to this section copied!

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 CommandsCopy link to this sectionLink to this section copied!

2.1 New Registry Entry CommandCopy link to this sectionLink to this section copied!

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 CommandCopy link to this sectionLink to this section copied!

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 CommandCopy link to this sectionLink to this section copied!

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 CommandCopy link to this sectionLink to this section copied!

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 CommandsCopy link to this sectionLink to this section copied!

3.1 Set Version CommandCopy link to this sectionLink to this section copied!

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 CommandCopy link to this sectionLink to this section copied!

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 CommandCopy link to this sectionLink to this section copied!

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 CommandCopy link to this sectionLink to this section copied!

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