Hi I have a strange issue with new Win 10 computers and elevating explorer.exe with my administrative account. I created a powershell app that serves as a menu system to launch other powershell apps with my admin id. So for example I set the admin credential with the following:
The Computer Support.exe then runs as my admin account. Everything works except when I try to do an admin share to the c: drive of a remote computer. It starts explorer.exe as my regular id that I’m logged into the computer with not my admin account. Here’s the simple code for the admin share:
This is working on some of the Win 10 computers but not others. I’m stumped. Any ideas to get it to run as intended with the admin id?
Thanks for any help in advance.
Is this part accurate? If so, you're not passing the credential object to Start-Process, so it'll default to launching with whatever account is running the script.
Yes it is but the computer support.exe application is running under my admin account so it should launch explorer.exe with the admin account. It does with some Win 10 computers and are working fine. Is there a better way to script this?
Most likely related to the same issue in which you can’t elevate explorer.exe at runtime in a user session.
As far as I know you would need to kill the your explorer.exe process first and then launch it again from e.g. command prompt.
It’s the same reason you’ll get UAC prompts if you try to access a folder locally where the folder permissions don’t allow you by default to access the folder.
There is possibly workarounds for it but explorer.exe is tricky to do fancy stuff with.