Windows 7 Forums


Windows 7: Tip to bypass UAC prompt w/ Task Scheduler AND focus the window

12 Jul 2012   #1

Windows 7 Ultimate x64
 
 
Tip to bypass UAC prompt w/ Task Scheduler AND focus the window

Just wanted to pass on this tip I found since it was hard to come by (only saw it in on one site).

Many of us know the trick about creating a shortcut with administrator privileges through the Task Scheduler to get around the UAC prompt. Elevated Program Shortcut without UAC Prompt - Create

But the annoying thing is when you open the program from this shortcut the window won't be focused and will open in the background if there are windows on top.


This trick will create the same admin level shortcut and focus the window as well.

Follow the tutorial as usual but when you get to the Actions tab, in the Program/script box enter:

C:\WINDOWS\System32\cmd.exe


In the Add arguments (optional) box enter:

/c start "TaskName" "Program Path"


For example: /c start "StartChrome" "C:\Program Files\Chrome\Chrome.exe"




This will open up cmd.exe and pass the arguments to it, because /c is specified it will run those arguments and then close. Since 'start' will give anything started with it focus, the program will come up with its window focused.

Do everything else in the tutorial the same and that's it. Hope this helps somebody else, because the unfocused window was really bugging me.
My System SpecsSystem Spec

18 Jul 2012   #2

64-bit Windows 7 Ultimate SP1 & Windows 8 Enterprise
Texas
 
 

Thank you chillz. Steps 7 and 8 have been updated in the tutorial for this to help others.

Elevated Program Shortcut without UAC Prompt - Create
My System SpecsSystem Spec
Reply

 Tip to bypass UAC prompt w/ Task Scheduler AND focus the window problems?



Thread Tools



Similar help and support threads for: Tip to bypass UAC prompt w/ Task Scheduler AND focus the window
Thread Forum
ElevatedShortcut - bypass the UAC prompt! Free Developer Programs and Projects
Task scheduler unable to load task status/active tasks at startup. Performance & Maintenance
Solved Need to bypass 'Your password has expired' using recovery CLI prompt General Discussion
Function of time field in New Trigger window Task Scheduler? Customization
Console output window shown by task scheduler Performance & Maintenance


All times are GMT -5. The time now is 06:40 PM.


Seven Forums Android App Seven Forums IOS App Follow us on Facebook

Windows 7 Forums is an independent web site and has not been authorized,
sponsored, or otherwise approved by Microsoft Corporation.
"Windows 7" and related materials are trademarks of Microsoft Corp.
© Designer Media Ltd
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32