Home:ALL Converter>Run a batch file creating a task in Windows 7 task scheduler without UAC popup

Run a batch file creating a task in Windows 7 task scheduler without UAC popup

Ask Time:2014-06-13T12:17:45         Author:Tastybrownies

Json Formatter

I need to run a batch file to create a task in Windows 7 Task Scheduler and I'm running into permission problems and UAC issues. And of course this same code worked flawlessly on Windows XP.

I've tried creating my command line one-liner to run with highest privileges and user the SYSTEM username but I still get an access denied error inside the command prompt. Now if I right click the script and click run CMD as administrator everything works the way its supposed to. However I'm making this for more than just myself. I can't have over 500 different users having to perform these right clicks since this process is meant to be somewhat automated.

So I'm guessing this script will never run if the logged in user trying to run it is anything less than an admin, correct? Is there any automated way to create a task to put in scheduler via command line without having popups? At this point I feel like this question has been asked thousands of times.

Author:Tastybrownies,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/24197626/run-a-batch-file-creating-a-task-in-windows-7-task-scheduler-without-uac-popup
yy