Solved

Script to change IE settings

Posted on 2008-06-19
8
633 Views
Last Modified: 2012-05-05
Hi there

I need a batch file (script) that can change the cookies settings in Internet Explorer. It should enable the option "Override automatic cookie handling" and "Always allow session cookies" under the Advanced Privacy settings.
0
Comment
Question by:TIO-Solutions
  • 3
  • 3
  • 2
8 Comments
 
LVL 3

Expert Comment

by:cholmskov
ID: 21821472
Ok so far I have found out how to activate the Override Automatic Cookie Handling, it's done here.

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]

Just gotta modify the key called "PrivacyAdvanced" from 0 to 1

Im still trying to find the Always Allow, it don't seem to be in the same place.
0
 
LVL 3

Expert Comment

by:cholmskov
ID: 21821667
Im afraid im out of time to search more, I think the answer can be found here, but so far no luck.

http://support.microsoft.com/?kbid=182569
0
 

Author Comment

by:TIO-Solutions
ID: 21821730
I have been looking, but with no luck so far
0
 
LVL 38

Expert Comment

by:Shift-3
ID: 21822494
Wow, that is one abstruse KB article.

Through experimenting with Process Monitor (http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx) I was able to get the boxes checked using the .reg file below.  I tried it on two machines, but you will probably want to test it more extensively before mass-deploying it.


Windows Registry Editor Version 5.00
 

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]

"PrivacyAdvanced"=dword:00000001
 

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3]

"{AEBA21FA-782A-4A90-978D-B72164C80120}"=hex:1a,37,61,59,23,52,35,0c,7a,5f,20,\

  17,2f,1e,1a,19,0e,2b,01,73,13,37,13,12,14,1a,15,2a,4e,2c,08,0d,20,1b,28,18,\

  36,32

"{A8A88C49-5EB2-4990-A1A2-0876022C854F}"=hex:1a,37,61,59,23,52,35,0c,7a,5f,20,\

  17,2f,1e,1a,19,0e,2b,01,73,13,37,13,12,14,1a,15,2a,4e,2c,08,0d,20,1b,28,18,\

  36,32

Open in new window

0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 
LVL 38

Expert Comment

by:Shift-3
ID: 21822509
This .reg file reverses the settings.


Windows Registry Editor Version 5.00
 

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings]

"PrivacyAdvanced"=dword:00000000
 

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3]

"{AEBA21FA-782A-4A90-978D-B72164C80120}"=hex:1a,37,61,59,23,52,35,0c,7a,5f,20,\

  17,2f,1e,1a,19,0e,2b,01,73,13,37,13,12,14,1a,15,2a

"{A8A88C49-5EB2-4990-A1A2-0876022C854F}"=hex:1a,37,61,59,23,52,35,0c,7a,5f,20,\

  17,2f,1e,1a,19,0e,2b,01,73,13,37,13,12,14,1a,15,2a

Open in new window

0
 

Author Comment

by:TIO-Solutions
ID: 21822906
So how do I write the batch file to automatically make the changes in my registry?
0
 
LVL 38

Accepted Solution

by:
Shift-3 earned 500 total points
ID: 21823473
You can either import the .reg file with REGEDIT /S or use REG ADD lines as below.  Note that the REG command was first included in Windows XP, so if you have any 2000 clients you'll have to put a copy of REG.EXE in your script directory.


@echo off

setlocal
 

set bin=1a3761592352350c7a5f20172f1e1a190e2b017313371312141a152a4e2c080d201b28183632
 

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v PrivacyAdvanced /t REG_DWORD /d 1 /f

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" /v {AEBA21FA-782A-4A90-978D-B72164C80120} /t REG_BINARY /d %bin% /f

reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\3" /v {A8A88C49-5EB2-4990-A1A2-0876022C854F} /t REG_BINARY /d %bin% /f

Open in new window

0
 

Author Comment

by:TIO-Solutions
ID: 21823553
Everything was working
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

TOMORROW TOMORROW.BAT is inspired by a question I get asked over and over again; that is, "How can I use batch file commands to obtain tomorrow's date?" The crux of this batch file revolves around the XCOPY command - a technique I discovered w…
Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
The viewer will learn how to dynamically set the form action using jQuery.
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now