xObay
Posts: 21
Joined: Sat Jan 06, 2024 4:56 pm

OperationStopped: Error opening file

Sat Jan 13, 2024 11:49 pm

Hello,

I'm following your tutorial on https://www.advancedinstaller.com/user- ... ation.html to create an AIP file. When i run the following commands, I get an error message saying

Code: Select all

OperationStopped: Error opening file
.

Code: Select all

PS C:\Users\obay\Desktop\Test> $advinst = New-Object -ComObject AdvancedInstaller
PS C:\Users\obay\Desktop\Test> $project = $advinst.CreateProjectS("professional")
PS C:\Users\obay\Desktop\Test>
PS C:\Users\obay\Desktop\Test> # Product Details
PS C:\Users\obay\Desktop\Test> $project.ProductDetails.Name = "xTags"
PS C:\Users\obay\Desktop\Test> $project.ProductDetails.Version = "1.0.0"
PS C:\Users\obay\Desktop\Test> $project.ProductDetails.Publisher = "xTools"
PS C:\Users\obay\Desktop\Test> $project.ProductDetails.SetIcon("xIcon.ico")
PS C:\Users\obay\Desktop\Test> $project.SaveAs("xTags.aip")
OperationStopped: Error opening file: "xTags.aip".
 
PS C:\Users\obay\Desktop\Test>
Any idea why that is?

xObay
Posts: 21
Joined: Sat Jan 06, 2024 4:56 pm

Re: OperationStopped: Error opening file

Sun Jan 14, 2024 12:08 am

The reason was that Advanced Installer is using Windows as it is working directory for some reason resulting in not being able to write there.

The problem is solved once you use the full path when saving the file.

Not very nice of AI.

Catalin
Posts: 6506
Joined: Wed Jun 13, 2018 7:49 am

Re: OperationStopped: Error opening file

Mon Jan 15, 2024 2:07 pm

Hello,

Thank you for your followup on this and for sharing your solution with us!

I am sure this will be of help for other users facing a similar scenario.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”