New add-onBuild & publish updates from your installer project. Host them securely in Updater Cloud.Learn more ›

IUnchainedPackageCopy link to this sectionLink to this section copied!

DeclarationCopy link to this sectionLink to this section copied!

IUnchainedPakage: IDispatch

OverviewCopy link to this sectionLink to this section copied!

This interface is meant to configure unchained prerequisites.

PropertiesCopy link to this sectionLink to this section copied!

SAFEARRAY(String) AdditionalFiles
Gets the list of additional files included in the package.

Bool AllowMaintenance
Gets or sets whether maintenance mode is allowed for the package.

Bool AllowRollback
Gets or sets whether rollback is allowed in case of installation failure.

Bool AllowUninstall
Gets or sets whether the package can be uninstalled.

Bool EnableLogging
Gets or sets whether logging is enabled during installation.

String InstallCmdLineBasicUi
Gets or sets the command line parameters for installation with basic UI.

String InstallCmdLineFullUi
Gets or sets the command line parameters for installation with full UI.

String InstallCmdLineSilentUi
Gets or sets the command line parameters for silent installation.

String InstallCondition
Gets or sets the condition that must be met for the package to install.

String InstallSchedule
Gets or sets the scheduled time or condition for installation. Posible values:
"Before" - for prerequisites scheduled before main package;
"During" - for prerequisites scheduled during main package;
"After" - for prerequisites scheduled after main package.

String LogFile
Gets or sets the path for the installation log file.

String MaintenanceCmdLine
Gets or sets the command line used for maintenance operations.

String MaintenanceCondition
Gets or sets the condition under which maintenance mode is available.

String Name
Gets or sets the name of the package.

String RollbackCmdLine
Gets or sets the command line used to perform a rollback operation.

String RollbackCondition
Gets or sets the condition under which rollback is performed.

String SourcePath
Gets or sets the source path of the package.

String UninstallCmdLine
Gets or sets the command line used to uninstall the package.

String UninstallCondition
Gets or sets the condition under which the package can be uninstalled.

Bool Framework
Enables or disables the Framework option for the prerequisite.

Bool AlwaysInstall
Gets or sets whether the prerequisite is always installed regardless of conditions.

Bool Install64BitLocations
Gets or sets whether searches are performed in 64-bit locations.

String SystemArchitecture
Gets or sets the target CPU architecture.

String UnsupportedWindowsVersions
Gets or sets the list of unsupported 32-bit Windows versions.

String UnsupportedWindows64Versions
Gets or sets the list of unsupported 64-bit Windows versions.

String Languages
ets or sets the list of language LCIDs for which the prerequisite applies.

String InstallConditionLogic
Gets or sets how install conditions are combined.

SAFEARRAY(ISearchCondition) InstallConditions (Read-only)
Gets the list of install conditions attached to the prerequisite.

MethodsCopy link to this sectionLink to this section copied!

Void AddAdditionalFile
Adds a file to the list of additional files to be included in the package.

Void RemoveAdditionalFile
Removes a file from the list of additional files included in the package.

ISearchCondition NewInstallCondition
Creates and adds a new install condition to the prerequisite

Void RemoveInstallCondition
Removes an existing install condition from the prerequisite

ExamplesCopy link to this sectionLink to this section copied!

Example 1: Framework prerequisite scheduled before the main package:

$advinst = New-Object -ComObject AdvancedInstaller
    $project = $advinst.LoadProject("C:\Work\MyProduct.aip")

    $prereqs = $project.PrerequisitesComponent
    $pkg     = $prereqs.NewUnchainedPackage("C:\Redist\vc_redist.x64.exe")

    $pkg.InstallSchedule        = "Before"
    $pkg.Framework              = $true
    $pkg.SystemArchitecture     = "OnlyX64"
    $pkg.Install64BitLocations  = $true
    $pkg.Languages              = "1033;1031;1048"
    $pkg.InstallConditionLogic  = "IfAtLeastOneConditionIsFalse"

    $cond = $pkg.NewInstallCondition("RegistryValueContent",
        "HKLM\SOFTWARE\Microsoft\VisualStudio\14.0\VC\Runtimes\x64\Installed")
    $cond.ComparisonType   = "ExactMatch"
    $cond.ReferenceContent = "1"

    $project.Save()
    $project.Close()

Example 2: Always-install prerequisite (no conditions evaluated):

 $pkg = $prereqs.NewUnchainedPackage("C:\Redist\bootstrapper.exe")
    $pkg.InstallSchedule = "During"
    $pkg.AlwaysInstall   = $true

Example 3: Architecture restriction and unsupported Windows versions:

 $pkg = $prereqs.NewUnchainedPackage("C:\Redist\arm64-runtime.exe")
    $pkg.InstallSchedule              = "Before"
    $pkg.SystemArchitecture           = "OnlyARM64"
    $pkg.UnsupportedWindowsVersions   = "Windows 7 x86, Windows 8 x86"
    $pkg.UnsupportedWindows64Versions = "Windows 7 x64"

Example 4: Multiple install conditions combined with AND logic