0

I need to run a file as administrator. When opening a file in cmd you write "start applicationhere" and it starts, but it starts without administrator. Is it possible that I run a file through cmd with administrator? Example "withadminpower start applicationhere".

  • [`sudo -i` Windows equivalent](https://stackoverflow.com/q/53584143/995714), [How to open an elevated cmd using command line for Windows?](https://stackoverflow.com/q/19098101/995714), [How to run 'sudo' command in windows](https://stackoverflow.com/q/9652720/995714) – phuclv Jul 26 '22 at 09:16

1 Answers1

1

cmd.exe itself cannot UAC elevate, you need to call Powershell:

powershell -Command "&{Start-Process -Verb RunAs winver.exe}"
Anders
  • 97,548
  • 12
  • 110
  • 164