Advertisement
Guest User

Untitled

a guest
May 4th, 2016
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.66 KB | None | 0 0
  1. @echo off
  2. REM This file assumes you have psexec installed
  3. REM Ask for machine name or IP
  4. set /p machine= Please enter the machine name or ip:
  5. REM check for workstation online, if not exit
  6. ping %machine% | find "Reply"
  7. if errorlevel 1 goto :offline
  8. if errorlevel 0 goto :install
  9.  
  10. :offline
  11. echo Workstation not online
  12. pause
  13. exit
  14.  
  15. :install
  16. xcopy "w:**********psexec.exe" \%machine%c$windowssystem32
  17. xcopy "w:********************fix.reg" \%machine%c$temp
  18. PsExec -s -i \%machine% -u domainadmin \%machine%c$windowsregedit.exe -i "c:tempfix.reg"
  19. pause
  20.  
  21. << Reg file fix.reg>>
  22. Windows Registry Editor Version 5.00
  23.  
  24. [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionRun]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement