New
#1
Run .BAT as admin without UAC prompt?
Edit: Marked as "Solved", because it looks like under Win 10 I can no longer do this quite the way I used to in Win 7, and I have multiple suggestions as to alternate approaches, any one of which ought to work.
((Moved from the "General" forum))
Can anyone help? I am trying to run a .BAT script that needs admin privileges, and I need to lose the annoying UAC prompt. I found out how to do that under Win 7, but can't get the same approach to work under Win 10.
I have created a task with "Run with highest privileges" to start my script. I then attempt to start it from a desktop shortcut. That works fine under WIn 7, and I've seen a couple of tutorials saying that it works under WIn 10 as well - but I can't get it to.
If I run the new task from within Task Scheduler, to check it out, it does exactly what I expect it to.
When I simply attempt to run it from the desktop shortcut (using a command of format schtasks /run /tn "mytask"), though, all that happens is that a window of some sort pops and disappears way too fast for me to see what it is trying to tell me (I've tried looking in event viewer for some sort of indication as to what it's objecting to, but can't see anything relevant). Under Win7, my script would execute successfully at this point.
If I finally cave in and choose to launch the shortcut with "Run as Administrator", the script executes OK - but that merely triggers the very UAC prompt I'm trying to avoid.
The account I'm using is an administrator. My script, amongst other things, executes runas.exe to launch a .EXE file under a second admin account.
Any bright ideas? Or other ways to achieve the same result?
Last edited by Doghouse; 13 Feb 2017 at 04:52.