Running TCC "elevated" — without a UAC query

#1
I'm writing this up based on great feedback from long-time JPS software users Charles (one of the forum admins) and Vincent. Thanks to both of them. (See also this TechRepublic article.)

Problem:
You want to run TCC with admin privileges. You don't want to switch off UAC entirely on your system, but you're tired of seeing the "Do you want to run this program?" query every time you launch the shortcut "elevated".​

Solution:
Create a Task Scheduler item for TCC.exe, with particular settings, and then make a desktop link to the scheduled task. Opening the link runs TCC "elevated" — without the query.
The following is — with Charles' and Vincent's advice — how I did it on a Win 7 system.

CREATE THE SCHEDULED TASK

Run the Windows Task Scheduler. If you don't already have a shortcut for it: press the Windows key. The start menu appears. Type the characters sched. Task Scheduler now appears at or near the top of the menu — click it to launch the scheduler.

The dialog has a lot of options. If I don't mention an option below, it means I didn't need to use it in setting up the scheduled task.

Select Create Task... in the Action menu. This opens the Create Task dialog, which has several panels.

GENERAL panel

Name field: pick a short name for the new task and type it into the Name field ("TCC", for example).

Security: use this control only if you need to change the name of the user account.

Select Run only when user is logged on.

This is the important bit: check the box labeled Run with highest privileges.

If the Configure for menu at the bottom of the panel isn't displaying the name of the operating system you're using, select the correct o.s. version.
TRIGGERS panel

You don't have to do anything in this panel.​

ACTIONS panel

Click New... to open the New Action dialog.

For Action, select Start a program.

In the Program/script field, enter the fully qualified path to TCC.exe — for example:

C:\TakeCommand\tcc.exe
If you need to launch TCC with switches or arguments, type them into the Add arguments (optional) text field.

I don't think you need to specify the starting directory, but if you prefer to include it, type its name in the Start in text field.

Click OK to close the dialog and return to the main Task Scheduler window.
CONDITIONS panel

If you run TCC on a desktop system, you can ignore this panel. If run TCC on a laptop, open the panel and:

UNcheck the box labeled Start the task only if the computer is on AC power. If the box is left checked, this whole solution to the UAC problem won't work at all when the laptop is on battery only. (I found out the hard way, and it took me a while to figure out why the task was failing.)​

SETTINGS panel

Check the Allow task to be run on demand check-box.​

This completes the setup in Task Scheduler. Click OK to close the dialog.

CREATE A DESKTOP SHORTCUT FOR THE SCHEDULED TASK

Right-click your desktop and select New > Shortcut. The Create Shortcut dialog opens.

In the Type the location of the item text field, type:

C:\Windows\System32\schtasks.exe /run /TN "title"

... where "title" is the name of the the scheduled task you've just created (e.g. "TCC"). The TechRepublic article referred to above notes that you should put the name in quote-marks. I don't know if that's required in all cases, or only if the scheduled task's name contains spaces. I suspect the latter. I used the quote-marks anyway.

DONE.

When you launch the desktop shortcut, TCC starts without the UAC dialog getting in the way.

You might find that the TCC window's appearance is not to your liking at first. If you need to change its position, font, screen colors, and so forth, right-click the new shortcut, select Properties, and update the properties as you would with any other console window's shortcut.

The only drawback I've found so far: the TCC console window does not have focus immediately after it is opened. You have to click it once to give it the focus.

[Edit: One caveat, discovered after I'd rebooted the first time I tried this: I guess it's because it takes a while for services to start up following a boot...the first time after the boot that I try launching the shortcut to the scheduled task, there's a long delay. A console window opens, but nothing happens in it for some time. Looks as if the system has hung. It hasn't. It's just waiting for something. Moderately irritating. Time to go make coffee.]
 
Last edited: