microsoft / MSIX-PackageSupportFramework

The Package Support Framework (PSF) is a kit for applying compatibility fixes to packaged desktop applications.
MIT License
114 stars 57 forks source link

Powershell startScript/EndScript error handling #226

Closed npuvvada closed 1 year ago

npuvvada commented 1 year ago

Why is this change being made?

When startScript or EndScript mentioned in config.json fails to run either due to execution policy for powershell not set correctly or due to any other reason, there is no warning message displayed to user and user would not know whether the mentioned script is run successfully or not.

What changed?

A warning popup message is displayed to user when startScript/EndScript fails to run mentioning the exitCode. If the exitCode matches with execution policy related failure, a detailed warning message is displayed mentioning the error and how user could reset execution policy

How was the change tested?

It was manually tested loading startScript in an application and confirming that a popup warning is displayed when powershell execution policy is set to Restricted.