Skip to content

Instantly share code, notes, and snippets.

@cnayan
Created June 19, 2020 09:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cnayan/a02d0a6674b9fdaea774faf8536fc4bb to your computer and use it in GitHub Desktop.
Save cnayan/a02d0a6674b9fdaea774faf8536fc4bb to your computer and use it in GitHub Desktop.
Launch CMD with modified path, as another user.
REM Example: Launching CMD with modified path, as another user.
runas /netonly /user:DOMAIN\user_name "C:\Windows\System32\cmd.exe /K set \"PATH=%%PATH%%;C:\Program Files (x86)\Microsoft SQL Server Management Studio 18\Common7\IDE\""
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment