run-as-admin.bat 264 B

123456789101112131415
  1. set command=%1
  2. @REM remove: quotes
  3. set command=%command:"=%
  4. set args=%2
  5. :param
  6. if "%3"=="" (
  7. goto end
  8. )
  9. set args=%args% %3
  10. shift /0
  11. goto param
  12. :end
  13. mshta vbscript:createobject("shell.application").shellexecute("%command%","%args%","","runas",0)(window.close)