Click here to Skip to main content
15,894,740 members
Articles / PowerBuilder
Tip/Trick

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

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
26 Nov 2011CPOL1 min read 29.2K   4  
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 tasks 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

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --