StartingScriptWrapper.ps1 - not launching with AppLocker enabled

Copper Contributor

Hi folks.


Has anyone got the above script to launch in environments where AppLocker is present? PowerShell runs for standard users in Constrained Language mode where AppLocker is enabled and this prevents the StartingScriptWrapper.ps1 script from launching due to the dot-sourcing at the start of the script. I thought that the script would be digitally signed so that it would pass an AppLocker Publisher rule but that doesn't seem to be the case. I tried signing it with a known good cert but that didn't work either. The same MSIX will launch fine on a machine without AppLocker present.

1 Reply
I have heard this feedback from others. The issue will be the AppLocker configuration. Ultimately, PSFTooling will run the StartingScriptWrapper which will then run your powershell script.

You will need to investigate why AppLocker is blocking this. Here are some ideas: If the configuration does not allow powershell to run, you are out of luck. If it requires the scripts to be signed, then you'll have to sign them. If it only allows scripts to be run from certain locations, you should add C:\Program Files\WindowsApps to that list.