TEXT 302
Untitled By Guest on 19th October 2016 10:44:43 PM
  1. @echo off
  2.  
  3. setlocal
  4.  
  5. echo.
  6. echo Determine whether we are on an 32 or 64 bit machine
  7. echo.
  8.  
  9. if "%PROCESSOR_ARCHITECTURE%"=="x86" if "%PROCESSOR_ARCHITEW6432%"=="" goto x86
  10.  
  11. set ProgramFilesPath=%ProgramFiles(x86)%
  12.  
  13. goto startResetting
  14.  
  15. :x86
  16.  
  17. set ProgramFilesPath=%ProgramFiles%
  18.  
  19. :startResetting
  20.  
  21. echo.
  22.  
  23. if exist "%ProgramFilesPath%\Windows Resource Kits\Tools\subinacl.exe" goto filesExist
  24.  
  25. echo ***ERROR*** - Could not find file %ProgramFilesPath%\Windows Resource Kits\Tools\subinacl.exe. Double-check that SubInAcl is correctly installed and re-run this script.
  26. goto END
  27.  
  28. :filesExist
  29.  
  30. pushd "%ProgramFilesPath%\Windows Resource Kits\Tools"
  31.  
  32. subinacl.exe /subkeyreg HKEY_LOCAL_MACHINE /grant=administradores=f  /grant=system=f
  33. subinacl.exe /subkeyreg HKEY_CURRENT_USER /grant=administradores=f  /grant=system=f
  34. subinacl.exe /subkeyreg HKEY_CLASSES_ROOT /grant=administradores=f  /grant=system=f
  35. subinacl.exe /subdirectories %windir% /grant=administradores=f /grant=system=f
  36.  
  37. echo FINISHED.
  38. echo.
  39. echo Press any key to exit . . .
  40. pause >NUL
  41.  
  42. popd
  43.  
  44. :END
  45.  
  46. endlocal

PasteBox is for source code and general debugging text.

Login or Register to delete or keep track of your pastes.