When "runOnce" is set in config, powershell runs only on first launch of the application. But, if powershell fails to run due to any reason on first launch (one reason could be powershell policy not set on device correctly), script would not be run on the subsequent launch (although the issue is identified and fixed). This would force the users to re-install the application although it need not be required. (Unless in the cases when powershell script itself has to be modified to fix the issue)
What changed?
-firstRun status of Powershell is reset until the powershell script runs successfully once.
The registry key 'PSFScriptHasRun' which is used to capture first run of powerShell is deleted in application package hive till powerShell script runs successfully.
-Documentation of 'runOnce' is updated.
How was the change tested?
It was manually tested by setting powershell execution policy on device to restricted and making sure powershell script runs even on subsequent launches of the application till execution policy issue is set to RemoteSigned/Bypass
Why is this change being made?
When "runOnce" is set in config, powershell runs only on first launch of the application. But, if powershell fails to run due to any reason on first launch (one reason could be powershell policy not set on device correctly), script would not be run on the subsequent launch (although the issue is identified and fixed). This would force the users to re-install the application although it need not be required. (Unless in the cases when powershell script itself has to be modified to fix the issue)
What changed?
-firstRun status of Powershell is reset until the powershell script runs successfully once. The registry key 'PSFScriptHasRun' which is used to capture first run of powerShell is deleted in application package hive till powerShell script runs successfully. -Documentation of 'runOnce' is updated.
How was the change tested?
It was manually tested by setting powershell execution policy on device to restricted and making sure powershell script runs even on subsequent launches of the application till execution policy issue is set to RemoteSigned/Bypass