[wix-users] Running PowerShell script after installer finishes
manish duggal
duggal_sunny at yahoo.com
Fri Jun 15 15:58:09 PDT 2018
Thx Nir and Edwin for your help here. I was able to figure out how to run the script and would like to share the details :)
From: Extra Actions
|
|
| |
Extra Actions
FireGiant
WiX tutorial
|
|
|
We can also launch any other executable on the user's machine if we provide its name in a property:
<Property Id='NOTEPAD'>Notepad.exe</Property><CustomAction Id='LaunchFile' Property='NOTEPAD' ExeCommand='[SourceDir]Readme.txt' Return='asyncNoWait' />
So I just used the similar kind of detail in my WIX as<Property Id='POWERSHELL'>powershell.exe</Property>
<CustomAction Id='LaunchUpdaterCmdlet' Property='POWERSHELL' ExeCommand='-NoProfile -NonInteractive -InputFormat None -ExecutionPolicy Bypass -File "[INSTALLDIR]UpdaterScript.ps1" "' Return='ignore' />
With this, I was able to run my script after InstallFinalize and as expected it prompts for elevation if needed.
ThxManish
On Friday, June 15, 2018, 12:27:12 a.m. PDT, Nir Bar <nir.bar at panel-sw.com> wrote:
You can use
https://www.nuget.org/packages/PowerShellWixExtension/
Sent from my ASUS
More information about the wix-users
mailing list