Smart questions
Smart answers
Smart people
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Member Login

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips now!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

Join Tek-Tips
*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

LINK TO THIS FORUM!

Add Stickiness To Your Site By Linking To This Professionally Managed Technical Forum.
Just copy and paste the
code below into your site.

Partner With Us!

"Best Of Breed" Forums Add Stickiness To Your Site
Partner Button
(Download This Button Today!)

Feedback

"...I am very impressed with the site and have already recommended it to one of my associates. I was truly impressed with the quickness in which someone actually responded to my question..."

Geography

Where in the world do Tek-Tips members come from?

not adding IP's to the Intranet Zones

wasserfa89 (TechnicalUser)
24 May 12 4:25
Hi all

On Internet Explorer 9 256 Bit we encouter the problem that we can't adding sites to the intranet zone even with the script below:

--------------------------------------------------------------------------------------------------------------------------------------------
' Adds an IP to the Security Sites

Option Explicit

Dim oShell
Set oShell = WScript.CreateObject("WScript.Shell")

' http://support.microsoft.com/kb/182569
Dim sSite, sDValue, sZone, sKey, sZonesPath, aKeys, aKey
sZonesPath="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains"
sSite=0
sDValue=1
sZone=2
' create key
aKeys = Array( _
Array(sZonesPath & "10.25.2.99\","","2"), _
Array(sZonesPath & "10.25.2.99\","","1") _
)
For Each aKey In aKeys
' create key for sSite
oShell.RegWrite aKey(sSite), aKey(sDvalue)

' add * dword under the site's key and set the sonze
sKey=aKey(sSite) & "*"
oShell.RegWrite sKey, aKey(sZone), "REG_DWORD"
MsgBox "Done"
Next
-----------------------------------------------------------------------------------------------------------------------------

it dosen't work

The IPs above won't be added to the Sites

and we are not able to add manually sites to the Intranet Zone

Any ideas? IE 9 Problem?


Geates (Programmer)
24 May 12 8:41
If you can't do it manually, I would suspect permissions. When you say "add manually", do you mean through Internet Options or directly in the registry.

"I hope I can chill and see the change - stop the bleed inside and feel again. Cut the chain of lies you've been feeding my veins; I've got nothing to say to you!"
-Infected Mushroom

"I do not offer answers, only considerations."
- Geates's Disclaimer

wasserfa89 (TechnicalUser)
24 May 12 8:43
ok coud be yes if you want to add the Sites the Button "ADD" is grayed out

Geates (Programmer)
24 May 12 9:12
Permissions (or a GPO). Log in as an admin and run the script. If that doesn't work, you can try manually adding the domain to the zone in the registry.

-Geates

"I hope I can chill and see the change - stop the bleed inside and feel again. Cut the chain of lies you've been feeding my veins; I've got nothing to say to you!"
-Infected Mushroom

"I do not offer answers, only considerations."
- Geates's Disclaimer

wasserfa89 (TechnicalUser)
24 May 12 9:26
both tried... Server temporary removed from GPO and then Add manually and this won't be saved
wasserfa89 (TechnicalUser)
24 May 12 9:36
dazedProblem solved.. IE was corrupted and Reset was the solutions thanks for your help
Geates (Programmer)
24 May 12 9:52
Good to hear. Here's come code I use to remotely (or locally) add domains to any zone

CODE --> vbs

'registry hives CONST HKEY_CURRENT_USER = &H80000001 CONST HKEY_LOCAL_MACHINE = &H80000002 'registry data types CONST REG_SZ = 1 CONST REG_DWORD = 4 'security zones CONST ZONE_MY_COMPUTER = 0 CONST ZONE_LOCAL = 1 CONST ZONE_TRUSTED = 2 CONST ZONE_INTERNET = 3 CONST ZONE_RESTRICTED = 4 sub addDomainToZone (strComputer, hexHive, strDomain, strContext, intZone) if (len(strSID)) then strSID = strSID & "\" set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv") objReg.CreateKey hexHive, "Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\" objReg.CreateKey hexHive, "Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\" & strDomain objReg.SetDWORDValue hexHive, "Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\" & strDomain, strContext, intZone end sub 'example addDomainToZone strComputerName, HKEY_CURRENT_USER, "", "google.com", "", ZONE_TRUSTED

-Geates

"I hope I can chill and see the change - stop the bleed inside and feel again. Cut the chain of lies you've been feeding my veins; I've got nothing to say to you!"
-Infected Mushroom

"I do not offer answers, only considerations."
- Geates's Disclaimer

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Back To Forum

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close