I'm trying to build an installer from scratch using Powershell, for use in a multi-project CI system. I am following this tutorial: https://www.advancedinstaller.com/user- ... ation.html
This simple script fails:
Code: Select all
$project = $advinst.CreateProjects("professional")
$project.ProductDetails.Name="$PROJECT_TITLE"
$project.ProductDetails.Publisher="Company Limited"
$project.ProductDetails.Version="$PROJECT_VERSION"
$project.FilesComponent.AddFolderContentS("APPDIR","build\bin")
$project.FilesComponent
$project.SaveAs("Installer.aip")
Code: Select all
$project.FilesComponent
Then, saving the project produces this error message:
Code: Select all
Error opening file: "Installer.aip".
At <script location>
+ $project.SaveAs("Installer.aip")
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : OperationStopped: (:) [], COMException
+ FullyQualifiedErrorId : System.Runtime.InteropServices.COMException
This occurs on 18.4 and 18.5
The documentation for ProductCode also seems confusing (GetProductCode and UpdateProductCode "Adds a new file in the project and returns the file as an object"?): https://www.advancedinstaller.com/user- ... tcode.html