Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Adding content advisor sites in IE

 
Logged in as: Guest
arrSession:exec spGetSession 2,2,53610
 Active Users: There are 0 members and 0 guests.
 Users viewing this topic: none
 

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Adding content advisor sites in IE
  Do you like VisualBasicScript.com? Link to us and help spread the word about our forum. Thanks!
Page: [1]
Login
Message << Older Topic   Newer Topic >>
 Adding content advisor sites in IE - 11/16/2007 9:44:34 AM   
  frist44

 

Posts: 18
Score: 0
Joined: 11/16/2007
Status: offline
We use the content advisor to allow certain websites. How would I go about scripting the addition of a particular site?
 
 
Post #: 1
 
 RE: Adding content advisor sites in IE - 11/16/2007 12:06:51 PM   
  dm_4ever


Posts: 2635
Score: 46
Joined: 6/29/2006
From: Orange County, California
Status: offline
How would you do it manually?  What changes occur when you do it manually? Is it a registry change, file change, etc, and what have you tried so far?

_____________________________

dm_4ever

My philosophy: K.I.S.S - Keep It Simple Stupid
Read Me: http://www.visualbasicscript.com/m_24727/tm.htm
Frequently Asked Stuff: http://www.visualbasicscript.com/m_47117/tm.htm

(in reply to frist44)
 
 
Post #: 2
 
 RE: Adding content advisor sites in IE - 11/16/2007 1:55:06 PM   
  frist44

 

Posts: 18
Score: 0
Joined: 11/16/2007
Status: offline
If the content advisor was turned on, if you just type the address in the bar, it'll pop up a box that lets you put in your content advisor password and a radio button that let's you "always allow website to be viewed" or "view this website this one time". If you choose "always allow this website to be viewed" and type in the correct password, the root domain is added to list of allowed sites, which can also be added manually in :

IE -> Tools -> Internet Options -> Content -> Settings -> Sites -> add to the list and choose "allow"

any ideas how to add this through script? I looked through the registry where the password for the content advisor is stored, and didn't see a site list, so it didn't seem very obvious to me.

(in reply to frist44)
 
 
Post #: 3
 
 RE: Adding content advisor sites in IE - 11/16/2007 6:25:59 PM   
  TNO


Posts: 1230
Score: 10
Joined: 12/18/2004
From: thenewobjective.com
Status: offline
View in IE:
http://techrepublic.com.com/5208-6230-0.html?forumID=39&threadID=167204&messageID=1708042

_____________________________

To iterate is human, to recurse divine. -- L. Peter Deutsch

(in reply to frist44)
 
 
Post #: 4
 
 RE: Adding content advisor sites in IE - 11/17/2007 2:17:55 AM   
  frist44

 

Posts: 18
Score: 0
Joined: 11/16/2007
Status: offline
This link doesn't include information to add a particular URL though. I can see how it would be enabled or not, but I need to add an actual website to the list.

(in reply to TNO)
 
 
Post #: 5
 
 RE: Adding content advisor sites in IE - 11/17/2007 4:45:06 AM   
  morpheus83uk

 

Posts: 373
Score: 0
Joined: 8/21/2006
Status: offline
Hello,

After following the registry key from the link given I have turned on Content Advisor and added a site in there...

I have found it does the following:

It adds the following key's:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings\PICSRules\.Default\0\PRPolicy\0\PRPPolicySub\0

The second Zero will go up one number each time a new entry is added... so if I added another site it would be:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings\PICSRules\.Default\0\PRPolicy\1\PRPPolicySub\0

The REG_SZ which is located in that third 0 key is called PRBUUrl and its data is the website you have allowed.

Now using this information you should be able to edit the registry using the regwrite method of the Wscript.Schell Object to add another site but you would probably have to enumerate the key below to see where the numbers are up to and then add one onto the end of this. I think an Array would be good for this.

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings\PICSRules\.Default\0\PRPolicy\

If you give it a go from the information given in this thread by others and then post your script we can have a look and guide you in the correct direction for your solution.

HTH

James


(in reply to frist44)
 
 
Post #: 6
 
 RE: Adding content advisor sites in IE - 11/17/2007 8:05:59 AM   
  frist44

 

Posts: 18
Score: 0
Joined: 11/16/2007
Status: offline
I tested the script and added exactly what the other sites had added. Here's what I wrote:

Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."

Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
   strComputer & "\root\default:StdRegProv")

strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings\PICSRules\.Default\0\PRPolicy\2"
oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath

strValueName = "PRPPolicyAttribute"
dwValue = 2
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings\PICSRules\.Default\0\PRPolicy\2\PRPPolicySub"
oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath
strValueName = "PRNumURLExpressions"
dwValue = 1
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strKeyPath = "SOFTWARE\Microsoft\Windows\CurrentVersion\policies\Ratings\PICSRules\.Default\0\PRPolicy\2\PRPPolicySub\0"
oReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath
strValueName = "PRBUHost"
strValue = "www.aol.com"
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
strValueName = "PRBUPort"
strValue = "80"
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
strValueName = "PRBUScheme"
strValue = "http"
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
strValueName = "PRBUUrl"
strValue = "www.aol.com"
oReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
strValueName = "PRBUInternetPattern"
dwValue = 1
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strValueName = "PRBUNonWild"
dwValue = 13
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue
strValueName = "PRBUSpecified"
dwValue = 31
oReg.SetDWORDValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,dwValue

The result didn't make a difference. www.aol.com hadn't been added to the list of allowed sites in IE. I"m not quite sure why because all the keys are identical to those other few that I added through the GUI.

any ideas?

(in reply to morpheus83uk)
 
 
Post #: 7
 
 RE: Adding content advisor sites in IE - 11/18/2007 1:34:03 AM   
  morpheus83uk

 

Posts: 373
Score: 0
Joined: 8/21/2006
Status: offline
Hello,

I ahve had a look at your code and I have looked at how it should work and what your code does... it missed a few keys out... one vital key which I have found needs to be added in at the end... So once that key is there your good to go...


      

The above code will add it into the GUI however if the site is not in the GUI to begin with make sure internet explorer is not running and then run your code and then re open it and go check and then as if by magic its there... 

Hope this helps

James

(in reply to frist44)
 
 
Post #: 8
 
 RE: Adding content advisor sites in IE - 11/18/2007 2:08:19 AM   
  frist44

 

Posts: 18
Score: 0
Joined: 11/16/2007
Status: offline
worked great. Thanks!

(in reply to morpheus83uk)
 
 
Post #: 9
 
 RE: Adding content advisor sites in IE - 11/18/2007 2:57:50 AM   
  morpheus83uk

 

Posts: 373
Score: 0
Joined: 8/21/2006
Status: offline
No problem post back if you need anything further!

Cheers

James

(in reply to frist44)
 
 
Post #: 10
 
 
 
  

If you found our site useful please link to us <a href="http://www.visualbasicscript.com">VisualBasicScript.com</a>.
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Adding content advisor sites in IE Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts