Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
2.2 KiB

  1. @echo off
  2. echo This batch file will modify some ACL permissions on the current
  3. echo user's profile directories, allowing the RESTRICTED user to access
  4. echo some parts of the profile, while denying access to others.
  5. echo This operation requires that the path shown below be on an NTFS
  6. echo file system.
  7. echo.
  8. echo "%UserProfile%"
  9. echo.
  10. echo You can abort this script now, or...
  11. pause
  12. rem Grant RESTRICTED read-only to everything
  13. cacls.exe "%UserProfile%" /e /t /g restricted:r
  14. rem Revoke RESTRICTED access to these private areas.
  15. cacls.exe "%UserProfile%\application data\identities" /e /t /r restricted
  16. cacls.exe "%UserProfile%\application data\microsoft\crypto" /e /t /r restricted
  17. cacls.exe "%UserProfile%\application data\microsoft\protect" /e /t /r restricted
  18. cacls.exe "%UserProfile%\local settings\application data\identities" /e /t /r restricted
  19. cacls.exe "%UserProfile%\local settings\application data\microsoft\crypto" /e /t /r restricted
  20. cacls.exe "%UserProfile%\local settings\application data\microsoft\protect" /e /t /r restricted
  21. rem Even worse, deny RESTRICTED to these private areas.
  22. cacls.exe "%UserProfile%\application data\identities" /e /t /d restricted
  23. cacls.exe "%UserProfile%\application data\microsoft\crypto" /e /t /d restricted
  24. cacls.exe "%UserProfile%\application data\microsoft\protect" /e /t /d restricted
  25. cacls.exe "%UserProfile%\local settings\application data\identities" /e /t /d restricted
  26. cacls.exe "%UserProfile%\local settings\application data\microsoft\crypto" /e /t /d restricted
  27. cacls.exe "%UserProfile%\local settings\application data\microsoft\protect" /e /t /d restricted
  28. rem Grant change control to the temporary folders.
  29. cacls.exe "%UserProfile%\local settings\temp" /e /t /g restricted:c
  30. cacls.exe "%UserProfile%\local settings\temporary internet files" /e /t /g restricted:c
  31. rem Revoke and deny access to our documents, too.
  32. rem Causes access denied on common dlg file open though.
  33. rem cacls.exe "%UserProfile%\My Documents" /e /t /r restricted
  34. rem cacls.exe "%UserProfile%\My Documents" /e /t /d restricted
  35. rem Revoke and deny access to cookies.
  36. cacls.exe "%UserProfile%\Cookies" /e /t /r restricted
  37. cacls.exe "%UserProfile%\Cookies" /e /t /d restricted
  38. pause