0

Is it please possible to run an EXE file under Administrator permissions automatically when a Windows domain (NON-Administrator account) user logs in, and if so, how would I do this?

MMM
  • 2,778
myro
  • 113
  • Programming questions are out of scope here at Super User – Ramhound Jul 15 '21 at 07:24
  • I've removed your code block as it is unrelated to your question; Running an executable with elevated permissions on login of a regular user – MMM Jul 15 '21 at 07:47
  • Well you probably have missed that the code was actually what the EXE does :-) I added the code in case someone understood what was in it and would be able to do it just in e.g. Powershell and windows registry – myro Jul 15 '21 at 09:52

1 Answers1

2

You should just create GPO policy with logon script that starts the your .exe file.

enter image description here

And the script should lock like this if it is Batch script:

"\\Share\YourApp.exe"

Or like this if it is a PowerShell script:

Start-Process -FilePath "\\Share\YourApp.exe"

Your application will be run with elevated premisions.

  • I almost downvoted because I'm already running through a GPO logon script, and there was no way I hadn't already tested running the exe through it. Otherwise, why would I have been Googling for a workaround for all these hours?? Then I test it and it works. Oh brother. – velkoon Sep 19 '22 at 21:04