IAdvancedInstallerCopy link to this sectionLink to this section copied!

The main interface entry point to work with Advanced Installer using automation commands. This interface represents Advanced Installer project picker and is used to create or load a project.

OverviewCopy link to this sectionLink to this section copied!

Iadvancedinstaller gm

PropertiesCopy link to this sectionLink to this section copied!

  • LicenseInfo (IAdvinstLicenseInfo)
    Gets an object that contains information about advanced installer license.
  • ProjectTypes (IAdvinstProjectTypes)
    Gets an object that contains the available project type values (e.g., Enterprise, Professional).

MethodsCopy link to this sectionLink to this section copied!

  • CreateProject (ProjectType)
    Creates a new project of the specified type.
    Returns: IAdvinstProject or IUpdatesProject depending on the project type argument
  • CreateProjectFromTemplate (string templateName)
    Creates a new Advanced Installer project starting from a template.
    Returns: IAdvinstProject or IUpdatesProject depending on the project type argument
  • CreateProjectS (string projectTypeName)
    Creates a new Advanced Installer project by specifying the project type name (e.g., "Enterprise", "Professional", "Simple").
    Returns: IAdvinstProject or IUpdatesProject depending on the project type argument
  • Exit()
    Close the Advanced Installer automation engine instance.
  • LoadProject (string target)
    Loads an Advanced Installer project. Pass the absolute path to the project file on disk.
  • RegisterLicenseKey (string aLicenseKey)
    Register Advanced Installer using license key.
  • RegisterLicenseFile (string aLicenseFile)
    Register Advanced Installer using a license file. Pass the full path to the license file.
  • RegisterLicenseServer (string aHostAddress, string aProxyAddress)
    Register Advanced Installer using a license server. The default value for aProxyAddress argument is an empty string. Address example: 11.0.1.146:1024.

Sample command lines:

# IAdvancedInstaller automation
$advinst = New-Object -ComObject "AdvancedInstaller"

#get available methods
$advinst | gm

# create project type version 1
$advinst.CreateProject($advinst.ProjectTypes.Enterprise)
$project.SaveAs("F:\cmdlet\output\DemoProj Enterprise.aip")

# create project type version 2
$project = $advinst.CreateProjects("professional")
$project.SaveAs("F:\cmdlet\output\DemoProject Professional.aip")

# create project from template
$projectFromTemplate = $advinst.CreateProjectFromTemplate("My Demo Template")
$projectFromTemplate.SaveAs("F:\cmdlet\output\DemoProjectFromTemplate.aip")

# load project
$loadedProject = $advinst.LoadProject("F:\cmdlet\output\DemoProject Professional.aip")

$advinst.RegisterLicenseKey("$yourLicenseKey")
$advinst.RegisterLicenseFile("$pathToLicenseFile")

# list license info and project types properties
$advinst.LicenseInfo
$advinst.ProjectTypes

# Advanced Installer exit
$advinst.Exit()

# useful commands
# build a certain build from project
$loadedProject.Rebuild("DefaultBuild")

# build all builds from project
$loadedProject.Rebuild()
      
    

Topics