Solved

Script to change IE settings

Posted on 2008-06-19
8
640 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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
how to execute all sub dir 2 39
move command 5 52
Example unit tests with AngularJS 3 40
Check folder every for files and print them 5 21
In this tutorial I will show you how to provide a dynamic RTF document on your website generated with data from your database. For this tutorial you will need Microsoft Word or WordPad, WhizBase and Microsoft Access. In this tutorial I will show …
Being a system administrator some time we require to do things remotely, one of them is installing software. Here I am going to tell you how to install software through wmic (Windows management instrument console). I am not at all saying that this i…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

914 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

20 Experts available now in Live!

Get 1:1 Help Now