ScadaDaqUnInstall.cmd 467 B

12345678910111213141516
  1. @echo off
  2. >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
  3. if '%errorlevel%' NEQ '0' (
  4. goto UACPrompt
  5. ) else ( goto gotAdmin )
  6. :UACPrompt
  7. echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"
  8. echo UAC.ShellExecute "%~s0", "", "", "runas", 1 >> "%temp%\getadmin.vbs"
  9. "%temp%\getadmin.vbs"
  10. exit /B
  11. :gotAdmin
  12. if exist "%temp%\getadmin.vbs" ( del "%temp%\getadmin.vbs" )
  13. cd /d %~dp0
  14. SCADA_DAQ.Service uninstall
  15. pause