Hello,
In the past I use to make Batch startup scripts run only once by creating a .txt file somewhere on the C: drive at the end of the script, the first line of the script would check if the file exist and then quit the script. This way I made sure that the script will run only once.
Now I have a PS command line that fixes AppX on Windows 10, I need to achieve the same but only that this time it has to run as a Powershell script.
I have tried to run the Powershell from with in a batch file:
"C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe" -executionpolicy bypass -NoProfile -file "C:\SoftwareInstall\CalcFix.ps1"
But that doesn't work.
Will be extremely useful if I could have a Powershell script that can do the same as what I've used to do in my Batch scripts.
Thanks