Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Windows Registry Editor Version 5.00
- [HKEY_LOCAL_MACHINESOFTWAREJavaSoft]
- "SPONSORS"="DISABLE"
- [HKEY_LOCAL_MACHINESOFTWAREWow6432NodeJavaSoft]
- "SPONSORS"="DISABLE"
- reg add HKLMsoftwarejavasoft /v "SPONSORS" /t REG_SZ /d "DISABLE" /f
- reg add HKLMSOFTWAREWow6432NodeJavaSoft /v "SPONSORS" /t REG_SZ /d "DISABLE" /f
- REM Detect processor architecture
- set proc_arch=x64
- if "%PROCESSOR_ARCHITECTURE%" == "x86" (
- if not defined PROCESSOR_ARCHITEW6432 set proc_arch=x86
- )
- REM Define Ask Toolbar path
- if "%proc_arch%" == "x86" set AskPath=%ProgramFiles%Ask.com
- if "%proc_arch%" == "x64" set AskPath=%ProgramFiles(x86)%Ask.com
- set AskReadme=%AskPath%..Ask.com_ReadMe.txt
- set AskRevert=%AskPath%..Ask.com_RestorePermissions.cmd
- REM Create dummy Ask Toolbar folder
- md "%AskPath%"
- REM Add explanatory text file, as to why the dummy folder is there
- echo The 'Ask.com' folder is has been created and write protected,> "%AskReadme%"
- echo in order to prevent Ask.com Toolbar from being 'accidentally'>> "%AskReadme%"
- echo installed, e.g. by Java.>> "%AskPath%readme.txt">> "%AskReadme%"
- echo.>> "%AskReadme%"
- echo This has been done using ICACLS by denying write access to the>> "%AskReadme%"
- echo EVERYONE security group.>> "%AskReadme%"
- echo.>> "%AskReadme%"
- echo To revert permissions run:>> "%AskReadme%"
- echo %AskRevert%>> "%AskReadme%"
- REM Create script to remove restrictions
- echo icacls "%AskPath%" /remove:d *S-1-1-0> "%AskRevert%"
- REM Deny everyone (SID: S-1-1-0) write access
- icacls "%AskPath%" /deny *S-1-1-0:(OI)(CI)W
- CLASS MACHINE
- CATEGORY !!cat01
- KEYNAME "SoftwareJavaSoft"
- POLICY !!polname
- SUPPORTED !!supOSes
- EXPLAIN !!poldescr
- PART !!msg01 EDITTEXT REQUIRED DEFAULT "DISABLE"
- VALUENAME "SPONSORS"
- END PART
- END POLICY
- END CATEGORY
- [strings]
- cat01="Java Update Sponsor Offers x86 Windows"
- polname="Set Value"
- supOSes="Windows 2000+"
- poldescr="Enabling this policy and leaving this field reading "DISABLE" will remove sponsor offers during Java updates"
- msg01="DISABLED = Sponsor Offers Disabled"
- CLASS MACHINE
- CATEGORY !!cat01
- KEYNAME "SOFTWAREWow6432NodeJavaSoft"
- POLICY !!polname
- SUPPORTED !!supOSes
- EXPLAIN !!poldescr
- PART !!msg01 EDITTEXT REQUIRED DEFAULT "DISABLE"
- VALUENAME "SPONSORS"
- END PART
- END POLICY
- END CATEGORY
- [strings]
- cat01="Java Update Sponsor Offers x64 Windows"
- polname="Set Value"
- supOSes="Windows 2000+"
- poldescr="Enabling this policy and leaving this field reading "DISABLE" will remove sponsor offers during Java updates in 64-bit Windows"
- msg01="DISABLED = Sponsor Offers Disabled"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement