How to Stop the Admin Permission Prompt When Running a BAT File
When you run a BAT file in Windows, the User Account Control, or UAC prompt, displays before the commands in the BAT file are executed. You can, however, stop the admin prompt when you initiate the execution of a BAT file in two ways. You can manually run the program as Administrator, or you can schedule a task that will automatically run the BAT file on a specific date and time, with administrative rights.
1 Manually Run as Administrator
To stop the admin prompt when manually running the BAT file, open File Explorer and browse to the BAT file. Right-click on the file, then click the “Run as Administrator” option that appears in the context menu. The BAT file immediately executes with admin privileges and the UAC prompt does not appear.
2 Schedule as Task
If you want to schedule the BAT file to run automatically in the Task Scheduler, set up the task, then configure the scheduler to use the highest level of privileges to execute the BAT file. Search for the word “task” in Windows, then click the “Task Scheduler” option to open the tool. Click “Create Task,” then type a name for the task. Click the “Trigger” option in the left sidebar, select the frequency for the task to execute, then enter the time and day information. Click “Actions” in the left sidebar, then click the “Start a Program” radio button. Click the “Browse” button, then navigate to the BAT file. Click the file, then click “Open.” The path loads to the field. Click “Finish” in the left panel to save the task.
3 Assign Highest Privileges
Once the new task has been created, you must now re-open the task to assign highest privileges to the process. Click the Task Scheduler Library option, then click the task to open the task details. Click the “Run with Highest Privileges” check box in the General section of the dialog box. Click “OK” to save the changes. The task will now execute the BAT file with admin rights.
4 Considerations
You must be logged in to the computer with administrative rights to manually run a BAT file as Administrator. You must also have administrator privileges to schedule the executable file to automatically process.