Skip to content

Instantly share code, notes, and snippets.

@liyafe1997
Last active December 7, 2020 03:31
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save liyafe1997/e036a7c3d4fb3903d567ec6d62c324ef to your computer and use it in GitHub Desktop.
Save liyafe1997/e036a7c3d4fb3903d567ec6d62c324ef to your computer and use it in GitHub Desktop.
sudo for Windows, save as sudo.bat put in C:\Windows then you can sudo lol. Powershell see https://gist.github.com/liyafe1997/93be39df5ffee18a1c14a24122576e15
@echo off
powershell -Command "(($arg='/k cd /d '+$pwd+' && %*') -and (Start-Process cmd -Verb RunAs -ArgumentList $arg))| Out-Null"
@echo on
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment