How to Elevate CMD to Admin on Windows: Step-by-Step

Windows UAC blocks file operations in restricted folders without admin rights. Since it’s lacking a native tool, this guide offers six methods to trigger UAC elevation in command prompts and batch files.

Cmd access denied

Best Tools to Elevate Command Prompt to Admin

1. NirCmd – Tiny but Mighty

NirCmd is a small command-line tool that can run over 100 tasks. For UAC elevation, just use its elevate command. It’s perfect for running apps or scripts as admin straight from shortcuts or batch files.

NirCmd elevate 7zip

Why it rocks:

  • Only about 100KB
  • Super easy to add to scripts or shortcuts
  • No install needed

Heads up: No GUI or fancy features. Just raw functionality.

Download NirCmd


2. Gsudo – The sudo for Windows

Gsudo brings Linux-style sudo commands to Windows. It elevates your command in the same terminal window, and it can even cache your credentials if you want.

Gsudo

Why it rocks:

  • Works with CMD and PowerShell
  • Doesn’t open a new window
  • Optional password caching

Heads up: You’ll need to tweak a config file to enable password caching.

Download Gsudo


3. Elevate by Kai Liu – Ultra Lightweight

This one’s just a tiny 6KB tool. It runs a command with admin rights and can optionally keep the window open. It’s great for launching tools in scripts or via shortcuts.

Kai Liu Elevate

Why it rocks:

  • Super small and fast
  • Comes with both 32-bit and 64-bit versions
  • Perfect for script automation

Heads up: It comes zipped — use 7-Zip or another extractor.

Download Elevate by Kai Liu


4. RunElevated – Handy for Batch Files

RunElevated can run apps or scripts as admin via shortcuts or from right-click context menus. If you don’t pass a command, it even lets you pick something from a file browser.

Runelevated request UAC

Why it rocks:

  • Great for batch files
  • Easy to integrate into shortcuts
  • Optional: open a new console with cmd /k

Heads up: If your script runs too fast, you might miss the output unless you tweak it.

Download RunElevated


5. Elevate by Johannes Passing – Simple & Solid

Here’s another “elevate” tool — this one doesn’t rely on .NET and has a couple of nice options like keeping the console open and waiting for the process to end.

Johannes Passing Elevate tool

Why it rocks:

  • Doesn’t need .NET
  • Can wait for the process or keep the window open
  • Clean and efficient

Heads up: No GUI or caching — but that’s also what keeps it lean.

Download Elevate by Johannes Passing


6. Use Built-in Tools: CMD & PowerShell

You don’t always need third-party stuff. PowerShell and CMD can do it too — just use Start-Process with -Verb RunAs.

Powershell launch admin cmd

Why it rocks:

  • Built into Windows
  • No downloads or installs
  • Perfect for one-off admin jobs

Heads up: You’ll need to be careful with quotes if your command gets long.


Wrap-Up

Whether you’re a casual user or a power scripter, these tools let you dodge the UAC hassle while keeping your workflow smooth. NirCmd is great for tiny tasks, Gsudo gives you Linux vibes, and PowerShell’s always there if you’re going native.

Want help picking the right one for your setup? Just ask — happy to help.

8 Comments - Write a Comment

  1. Gerardo Grignoli 5 years ago
    • Balazs Varnai 5 years ago
    • Tony 5 years ago
  2. Daniel Njuguna 5 years ago
    • Shivam Tomar 4 years ago
      • James C Rocks 4 years ago
  3. xpclient 13 years ago
    • Kubo 13 years ago

Leave a Reply

Your email address will not be published. Required fields are marked *

Note: Your comment is subject to approval. Read our Terms of Use. If you are seeking additional information on this article, please contact us directly.