Yes, Mike_D, please share the details. This is what I ended up doing:
Prerequisites: I already have an account on each PC with the same ID/Password that made this possible.
-
I created a toolbox with the following script line. This created a single task that executed as the local user at a specific time and then never runs again. The RemoveSkype.bat file was a resource added to the toolbox:
SCHTASKS /CREATE /SC ONCE /RU UserNameHere /TN RunOnce /TR “C:\Scripts\RemoveSkype.bat” /ST 21:30 -
In the RemoveSkype.bat, I had the following lines to remove the 2 current versions of skype, and then to delete the task called RunOnce (created in step 1):
powershell Remove-AppxPackage -Package "Microsoft.SkypeApp_15.61.100.0_x86__kzf8qxf38zg5c"
timeout 5
powershell Remove-AppxPackage -Package "Microsoft.SkypeApp_15.63.76.0_x86__kzf8qxf38zg5c"
SCHTASKS /DELETE /TN “RunOnce” /F -
I didn’t care if the .bat file remained in the Scripts folder, so I left it. But I could have created another toolbox to delete the file if I needed to.
You can use this same method to also change HKCU registry changes and anything else that needs to run as a local user instead of SYSTEM.
I hope there is a better way than this hacked together process.
Hope this helps.
Drew