Advertisement
Guest User

Untitled

a guest
Nov 26th, 2014
170
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.53 KB | None | 0 0
  1. Windows Registry Editor Version 5.00
  2.  
  3. [HKEY_LOCAL_MACHINESOFTWAREJavaSoft]
  4. "SPONSORS"="DISABLE"
  5.  
  6. [HKEY_LOCAL_MACHINESOFTWAREWow6432NodeJavaSoft]
  7. "SPONSORS"="DISABLE"
  8.  
  9. reg add HKLMsoftwarejavasoft /v "SPONSORS" /t REG_SZ /d "DISABLE" /f
  10. reg add HKLMSOFTWAREWow6432NodeJavaSoft /v "SPONSORS" /t REG_SZ /d "DISABLE" /f
  11.  
  12. REM Detect processor architecture
  13. set proc_arch=x64
  14. if "%PROCESSOR_ARCHITECTURE%" == "x86" (
  15. if not defined PROCESSOR_ARCHITEW6432 set proc_arch=x86
  16. )
  17.  
  18. REM Define Ask Toolbar path
  19. if "%proc_arch%" == "x86" set AskPath=%ProgramFiles%Ask.com
  20. if "%proc_arch%" == "x64" set AskPath=%ProgramFiles(x86)%Ask.com
  21. set AskReadme=%AskPath%..Ask.com_ReadMe.txt
  22. set AskRevert=%AskPath%..Ask.com_RestorePermissions.cmd
  23.  
  24. REM Create dummy Ask Toolbar folder
  25. md "%AskPath%"
  26.  
  27. REM Add explanatory text file, as to why the dummy folder is there
  28. echo The 'Ask.com' folder is has been created and write protected,> "%AskReadme%"
  29. echo in order to prevent Ask.com Toolbar from being 'accidentally'>> "%AskReadme%"
  30. echo installed, e.g. by Java.>> "%AskPath%readme.txt">> "%AskReadme%"
  31. echo.>> "%AskReadme%"
  32. echo This has been done using ICACLS by denying write access to the>> "%AskReadme%"
  33. echo EVERYONE security group.>> "%AskReadme%"
  34. echo.>> "%AskReadme%"
  35. echo To revert permissions run:>> "%AskReadme%"
  36. echo %AskRevert%>> "%AskReadme%"
  37.  
  38. REM Create script to remove restrictions
  39. echo icacls "%AskPath%" /remove:d *S-1-1-0> "%AskRevert%"
  40.  
  41. REM Deny everyone (SID: S-1-1-0) write access
  42. icacls "%AskPath%" /deny *S-1-1-0:(OI)(CI)W
  43.  
  44. CLASS MACHINE
  45.  
  46. CATEGORY !!cat01
  47.  
  48. KEYNAME "SoftwareJavaSoft"
  49. POLICY !!polname
  50.  
  51. SUPPORTED !!supOSes
  52. EXPLAIN !!poldescr
  53.  
  54. PART !!msg01 EDITTEXT REQUIRED DEFAULT "DISABLE"
  55. VALUENAME "SPONSORS"
  56. END PART
  57.  
  58. END POLICY
  59.  
  60.  
  61. END CATEGORY
  62.  
  63. [strings]
  64. cat01="Java Update Sponsor Offers x86 Windows"
  65. polname="Set Value"
  66. supOSes="Windows 2000+"
  67. poldescr="Enabling this policy and leaving this field reading "DISABLE" will remove sponsor offers during Java updates"
  68. msg01="DISABLED = Sponsor Offers Disabled"
  69.  
  70. CLASS MACHINE
  71.  
  72. CATEGORY !!cat01
  73.  
  74. KEYNAME "SOFTWAREWow6432NodeJavaSoft"
  75. POLICY !!polname
  76.  
  77. SUPPORTED !!supOSes
  78. EXPLAIN !!poldescr
  79.  
  80. PART !!msg01 EDITTEXT REQUIRED DEFAULT "DISABLE"
  81. VALUENAME "SPONSORS"
  82. END PART
  83.  
  84. END POLICY
  85.  
  86.  
  87. END CATEGORY
  88.  
  89. [strings]
  90. cat01="Java Update Sponsor Offers x64 Windows"
  91. polname="Set Value"
  92. supOSes="Windows 2000+"
  93. poldescr="Enabling this policy and leaving this field reading "DISABLE" will remove sponsor offers during Java updates in 64-bit Windows"
  94. msg01="DISABLED = Sponsor Offers Disabled"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement