Advertisement
Guest User

Untitled

a guest
Jul 13th, 2011
96
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. @echo off
  2. if exist "%systemroot%\KB930801.SYS" (goto next) ELSE (
  3. echo. >"%systemroot%\KB930801.SYS"
  4. reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /f /v Runexec /t reg_sz /d 3
  5. exit
  6. )
  7.  
  8. :next
  9. for /f "Skip=1 Tokens=3*" %%a in ('reg query
  10. "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v Runexec') do set valor_da_chave=%%a
  11. set /a valor_da_chave=%valor_da_chave%-1
  12. if /i [%valor_da_chave%]==[0] goto exec
  13. reg add "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /f /v Runexec /t reg_sz /d %valor_da_chave%
  14. exit
  15.  
  16. :exec
  17. :: Coloque aqui o que vc quer que seja executado apos 3 inicializações
  18. msg * O computador foi reiniciado 3 vezes.
  19. exit
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement