Install Powershell script with WiX Install Powershell script with WiX powershell powershell

Install Powershell script with WiX


Group Policy is the better way to go about it,

I think the reason that your call to PowerShell.exe is not changing the execution policy is because the cmdlet is set to prompt the user before changing the execution policy. The -Force parameter will force the change without an additional prompt.


If you are using PowerShell 2.0, there is a -ExecutionPolicy parameter on PowerShell.exe. Try something like this in one single custom action to run the script.

ExeCommand="-NoLogo -NoProfile -ExecutionPolicy RemoteSigned -File <scrptpath>"


I will set the ExecutionPolicy via group policies.