Batch Files

How to run Batch file as Administrator without prompt in Windows 10

How to run Batch file as Administrator without prompt in Windows 10

You can execute a number of tasks on your Windows computer by running commands. These commands work great. Some people also try to execute a number of these commands one by one. This bulk execution of commands helps them get greater output. But writing and executing these commands one by one manually takes a lot of time.

To counter this, Microsoft has added a feature of running Batch files on their operating systems. These batch files are also run by a number of software in the background to execute multiple tasks. But if you are running an independent script, you might need administrator-level privileges to execute them. This is what we are going to talk about in the guide.

If you wish to Run a batch file as an Administrator one time, simply right-click on the batch file that you wish to run and select Run as Administrator.

It will start executing that batch file with administrator rights.

Always Run Batch file as Administrator in Windows 10

If you wish to automatically elevate a Batch File and make it run as Administrator, follow these steps:

  1. Locate the Batch file
  2. Right-click on the Batch file
  3. Select Create Shortcut
  4. Give it a suitable name
  5. Now right-click the shortcut file
  6. Click Properties.
  7. Select Shortcuts tab > Advanced.
  8. Select Run As Administrator box.
  9. Click OK/Apply and exit.

Now, whenever you run the shortcut, the batch file will always Run as Administrator.

That's all!

Kuinka Xdotoolia käytetään stimuloimaan hiiren napsautuksia ja näppäilyjä Linuxissa
Xdotool on ilmainen ja avoimen lähdekoodin komentorivityökalu hiiren napsautusten ja näppäimistön simulointiin. Tässä artikkelissa käsitellään lyhyttä...
Viisi parasta ergonomista tietokonehiirtä Linux-tuotteille
Aiheuttaako pitkäaikainen tietokoneen käyttö kipua ranteessasi tai sormissasi?? Onko sinulla nivelten jäykkyys ja sinun on jatkuvasti ravistettava kät...
How to Change Mouse and Touchpad Settings Using Xinput in Linux
Most Linux distributions ship with “libinput” library by default to handle input events on a system. It can process input events on both Wayland and X...