Tuesday, October 4, 2011

How to Force an Application to Open in Administrator Mode without Prompt

Say you have an application, in my case the ancient PowerBuilder and you want it to always "Run as Administrator" so it has access to writing files to the Program Files (x86) folder instead of the users AppData folder.

Obviously you don't want to turn off UAC, that would be silly.

Here is a little trick that I've been using for a while to get an application to open without the annoying User Account Control prompt asking you to Allow the Application to run in Admin mode.

1. Go go the Administrative Tools -> Scheduled Tasks
2. Create a new Scheduled Task

3. Add a Task name and then make sure you select the "Run with highest privileges" option

4. Click on the Actions tab and then browse for the Application you want to open. In my case PowerBuilder

5. Click OK to save the task. Make a note of the Task Name you assigned.
6. Now, create a shortcut, on the target, you will call the task scheduler and then send as an argument the name of the task you previously created, like this: C:\Windows\System32\schtasks.exe /run /tn "YourTaskName" this will run your taks by invoking the Task Scheduler Directly.


You are all set, now use the shortcut to access your application. It will open with Administrative privileges.

If you would like to see this workaround in action and get additional details, please check my video posting below:



Hope it helps,
Will





11 comments:

  1. I tried, but: This method works in that case, if you have permission to create scheduled task... but if you haven't... unfortunately :-)

    Norbert, HUN

    ReplyDelete
    Replies
    1. This is great, does it work for programs stored on a network?

      Delete
  2. Will, I followed your instructions very carefully and made notes (in case it didn't work properly) and it solved my annoying problem with QuickBooks!!! Thank you so much!!!

    ReplyDelete
  3. Can this be done in GPO in a Network environment?

    ReplyDelete
    Replies
    1. If you're willing to put the time into creating a logon script *anything* can be GPO'd. This doesn't even require more than a bat file to complete. All this is would require is creating a scheduled task with schtasks then copying a shortcut (.lnk) file to the target computer from a network drive.

      Delete
  4. Worked when logon as admin but when i copied the shortcut on normal users desktop it does not work.

    ReplyDelete
  5. How to run AV tech Video Viewer multiple instance at the same time...can anyone tell me?/

    ReplyDelete

  6. ——=〔 ! Turn   off   UAC  ! 〕=——

    ReplyDelete