Abatch file includes the commands to be executed by Command Prompt in Windows 10 (and older versions). I have already explainedwhat a batch file isand how to create your own. However, you’ll require administrator privileges for your batch file to run some commands in the Windows Command Prompt.
In this article, let’s look at how to enable the ‘Run As Administrator’ option for a batch file in Windows. This simple trick will save your efforts of using the right-click to enable the ‘Run As Administrator’ command prompt every time.

How to Run a Batch File as Administrator in Windows 10?
We’ll be using Windows 10 to show the process of automatically running a batch file with Windows admin rights. However, the method works on older versions, including Windows 7 and Windows 8/8.1, as batch files have existed for a long time. Follow the steps mentioned below.
1.Right-clickon your batch file.
2. ClickCreate Shortcut
3.Right-clickon the shortcut files and click onProperties.
4. In the Shortcuts tab, click on Advanced.
5. Check the ‘Run as Administrator’ checkbox.
6. Click OK to close the dialogue box.
7. Click onApplyto save the changes. ClickOkto close Properties.
Now, every time you run the shortcut file by double-clicking it, theWindows UAC messagewill be displayed. Click Ok to run as administrator in Windows. This is required as commands would need access to more system-level components that are not available when you open CMD in user mode.
Did you find this helpful? Tell us in the comments below.



