Set Package Name Command

Command Syntax

/SetPackageName   <file_path>
                  { [-buildname <build_name>] | [-configuration <configuration_name>] }

Two outcomes are possible:

  • If only the package name is sent as argument this command will rename the package without changing the Parent Directory path.
AdvancedInstaller.com /edit MyProject.aip
    /SetPackageName MyPackage.msi -buildname DefaultBuild
  • If a full path pointing at the package is received as argument, this command will rename the package and will set the Parent Directory path pointing to the newly received location.
AdvancedInstaller.com /edit MyProject.aip
/SetPackageName C:\MyFolder\MyPackage.msi -buildname DefaultBuild

In this case, the Parent Directory path will point to "C:\MyFolder".

Parameters:

  • [-buildname <build_name>]
  • The package name will be set for this build.
  • [-configuration <configuration_name>]
  • For WinCE project only. The package name will be set for this configuration.

If the project uses an EXE bootstrapper, the /SetPackageName command can set its name. The command which sets the bootstrapper name looks like this:

AdvancedInstaller.com /edit MyProject.aip
    /SetPackageName MyPackage.exe -buildname DefaultBuild

If the project is WinCE project the /SetPackageName command looks like this:

AdvancedInstaller.com /edit MyProject.aip
    /SetPackageName MyPackage.cab -configuration Default

Save as MST

Save your project as an MST by using the SetPackageName command and an AIC file. For more information about commands see the command-line page.

AdvancedInstaller.com /execute D:\Packages\sample.msi D:\Packages\commands.txt

The AIC file(commands.txt) containing all the necessary commands:

;aic
AddFile APPDIR D:\Packages\sample.txt
SetPackageName D:\Packages\test.mst
Build

Set name of individual packages

Within a build, you can set the package name of individual installers (MSI and EXE) when creating an EXE setup.

AdvancedInstaller.com /edit "D:\Packages\Sample.aip" /SetPackageName MSIsample.msi -buildname DefaultBuild
AdvancedInstaller.com /edit "D:\Packages\Sample.aip" /SetPackageName EXEsample.exe -buildname DefaultBuild