ScadaDaqInstall.cmd 524 B

1234567891011121314151617
  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. netsh http add urlacl url="http://+:7888/" user="EveryOne"
  14. cd /d %~dp0
  15. SCADA_DAQ.Service install
  16. pause