IAdvinstProject

An interface designed to access the main components and can be used to Save or Build your project.

Overview

Iadvinstproject

Methods:

  • Build() - This method builds the project. The return will be a string that contains the build messages.
  • Rebuild()This method builds the project. The return will be a string that contains the build messages.
  • Save() - Saves all the changes done to the project. You can use this method if the project has a location on disk, otherwise, use SaveAs
  • SaveAs(String location) - Saves all the changes done to the project in a specific location on disk.

Properties:

Sample commands

# IAdvinstProject automation
$advinst = New-Object -ComObject "AdvancedInstaller"
$project = $advinst.CreateProject($advinst.ProjectTypes.Enterprise)

# get all properties and methods
$project | gm

$project.SaveAs("F:\cmdlet\output\DemoProject Enterprise.aip")
$project.Rebuild()

# access project properties
$project.ProductDetails.Name = "PowerShell Automation Demo"
$project.ProductDetails.Version = "2.0.0"
$project.ProductDetails.Publisher = "Caphyon LTD"

# configure launch conditions
$project.LaunchConditionsComponent.SoftwareLaunchConditions | gm
$project.LaunchConditionsComponent.SoftwareLaunchConditions.IIS = "Internet Information Services 7.0"
$project.LaunchConditionsComponent.SoftwareLaunchConditions.DotNetCore = ".NET Runtime 5.0"
$project.LaunchConditionsComponent.SystemLaunchConditions.MinPhysicalMemory = "2048"
$project.LaunchConditionsComponent.SystemLaunchConditions.PreventRunningIfPendingSystemChangesRequiresReboot = $true

$project.SaveAs("F:\cmdlet\output\DemoProject Enterprise.aip")
    

See also

IAdvancedInstaller

IAdvinstProjectTypes

IAdvinstLicenseInfo