Solved

Script - Add site to Local intranet list in IE

Posted on 2006-11-23
4
3,178 Views
Last Modified: 2013-12-04
Hi,

How do i do it using kixtart?

Like this?

$chkkey = keyExist("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\xxx.net");

if $chkkey = 0
$rs=addkey"HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\xxx.net");               $rs=writevalue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\InternetSettings\ZoneMap\Domains\xxx.net","https","1","REG_DWORD");
$rs=writevalue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\InternetSettings\Zones\1\1A00","0x00020000","REG_DWORD");
Endif  

Any better way to do it?
0
Comment
Question by:kuay23
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 

Author Comment

by:kuay23
ID: 18006590
Ok, i think the above works.. except for this

writevalue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\1A00","20000","REG_DWORD")

It did not update the key...
0
 
LVL 25

Expert Comment

by:mikeleebrla
ID: 18006835
>>Any better way to do it?
are you familar with GPOs?  If you are in a domain you can do this via a GPO and it will me much cleaner.
0
 
LVL 32

Accepted Solution

by:
r-k earned 500 total points
ID: 18010476
I'm not familiar with kixtart, but I would guess you have a syntax error there. Try changing:

writevalue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2\1A00","20000","REG_DWORD")

to

writevalue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\2", "1A00","20000","REG_DWORD")

or perhaps to

writevalue("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\1", "1A00","20000","REG_DWORD")


Note that "Zones\2" is for "Trusted Sites" and "Zones\1" is for "Local Intranet"

Also, I am not very familiar with the significance of that entry (1A00) and the value of "20000" so I hope you know why you want to set it that way.
0
 

Author Comment

by:kuay23
ID: 18017019
Thanks for the suggestions, seems like it really is a syntax error. the 20000 is for "Automatic logon only in intranet zone" (0x00020000). Anyway its wrong actually.. i tried 131072 and it seems fine.

I tested Group Policy at first too, but it seems using GP is more of importing the DC's settings to the clients..

Anyway i will award the points to r-k. Thanks.  
0

Featured Post

Automating Your MSP Business

The road to profitability.
Delivering superior services is key to ensuring customer satisfaction and the consequent long-term relationships that enable MSPs to lock in predictable, recurring revenue. What's the best way to deliver superior service? One word: automation.

Question has a verified solution.

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

In today's information driven age, entrepreneurs have so many great tools and options at their disposal to help turn good ideas into a thriving business. With cloud-based online services, such as Amazon's Web Services (AWS) or Microsoft's Azure, bus…
Security measures require Windows be logged in using Standard User login (not Administrator).  Yet, sometimes an application has to be run “As Administrator” from a Standard User login.  This paper describes how to create a shortcut icon to launch a…
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

740 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