Run simple powershell script

Common questions about using Actual Installer.
Post Reply
leeboozer
Posts: 2
Joined: Mon Mar 27, 2023 8:59 pm

Run simple powershell script

Post by leeboozer »

Can someone provide an example of running a simple powershell script from the app installation folder?

I can add the script to the installer, and the script gets installed fine.
But what to put in System --> Commands to execute the script from the app installation folder so far eludes me.
Leo
Site Admin
Posts: 455
Joined: Fri Jan 22, 2010 12:40 pm

Re: Run simple powershell script

Post by Leo »

Try this:

Code: Select all

File: <SystemDir>\cmd.exe
Parameters: /C powershell.exe "<InstallDir>\script.ps1"
Leo,
Actual Installer Team
https://www.actualinstaller.com
leeboozer
Posts: 2
Joined: Mon Mar 27, 2023 8:59 pm

Re: Run simple powershell script

Post by leeboozer »

Thanks Leo. That almost worked. Windows had a fuss about the (x86) in the path.

It worked once I added apostrophes just inside the quotation marks:

Parameters: /C powershell.exe "'<InstallDir>\PostInstall.ps1'"
Leo
Site Admin
Posts: 455
Joined: Fri Jan 22, 2010 12:40 pm

Re: Run simple powershell script

Post by Leo »

Thank you for this information.
Leo,
Actual Installer Team
https://www.actualinstaller.com
Post Reply