tiffanym
Posts: 8
Joined: Tue Aug 31, 2021 6:48 pm

Powershell not running - 18.6.1

Hello,

I'm using Powershell to build an msi file and sign it. I was having issues signing my code using 18.6 and saw there was a new version with an update (18.6.1). I removed 18.6 and installed 18.6.1 and now I'm unable to run my powershell script because it's looking for a template in the wrong directory.

Code: Select all

$advinst = New-Object -comobject AdvancedInstaller
$project = $advinst.CreateProject($advinst.ProjectTypes.Professional)
Here's the error

Code: Select all

PS C:\Users\xxx> C:\Users\xxx\Documents\test2.ps1
File not found: "C:\Program Files (x86)\Caphyon\Advanced Installer 18.6\templates\template.aip".
 
At C:\Users\xxx\Documents\test2.ps1:16 char:1
+ $project = $advinst.CreateProject($advinst.ProjectTypes.Professional)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (:) [], COMException
    + FullyQualifiedErrorId : System.Runtime.InteropServices.COMException
Daniel
Posts: 8238
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Powershell not running - 18.6.1

Hi,

I'm not sure why this happens. We have tested the scenario but everything works fine in our tests.

Can you please restart PowerShell and run again your script and see if this helps?

Otherwise, can you please proceed like this:

1. open an elevated window of command prompt (using "Run as admin" context menu option

2. run the following command

Code: Select all

"C:\Program Files (x86)\Caphyon\Advanced Installer 18.6.1\bin\x86\advinst.exe" /REGSERVER
Make sure you write /REGSERVER command with capital letters only.

3. reboot your machine and run again your script

and let us know if this helped.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
tiffanym
Posts: 8
Joined: Tue Aug 31, 2021 6:48 pm

Re: Powershell not running - 18.6.1

I had already ran the REGSERVER command and restarting powershell, but rebooting fixed the problem!

Thanks!!
Catalin
Posts: 6582
Joined: Wed Jun 13, 2018 7:49 am

Re: Powershell not running - 18.6.1

Hello Tiffany,

We are glad to hear everything works as expected now!

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

Return to “Building Installers”