Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Server > Scripting > Re: Simple registry edit through a script

Reply
Thread Tools Display Modes

Re: Simple registry edit through a script

 
 
Mark D. MacLachlan
Guest
Posts: n/a

 
      07-10-2009
Make a new GPO (don't use domain default) and then add a logon script
in that GPO. You didn't share the registry settings but I believe this
is what you are looking for:

Code:
'=======================================================================
===
'
' NAME: DisableGoMicrosoftCom.vbs
'
' AUTHOR: Mark D. MacLachlan , The Spider's Parlor
' URL: http://www.thespidersparlor.com
' DATE  : 7/10/2009
' COPYRIGHT © 2009, All Rights Reserved
'
' COMMENT:
'    THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
'    ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED To
'    THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
'    PARTICULAR PURPOSE.
'
'    IN NO EVENT SHALL THE SPIDER'S PARLOR AND/OR ITS RESPECTIVE
SUPPLIERS
'    BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY
'    DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
'    WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
'    ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
'    OF THIS CODE OR INFORMATION.
'
'=======================================================================
===
Dim WSHShell
Set WSHShell = CreateObject("Wscript.Shell")

Dim FirstRunCustomizeArray(4)
FirstRunCustomizeArray(0) = "HKLM\Software\Policies\Microsoft\Internet
Explorer\Main\"
FirstRunCustomizeArray(1) = "HKCU\Software\Policies\Microsoft\Internet
Explorer\Main\"
FirstRunCustomizeArray(2) = "HKCU\Software\Microsoft\Internet
Explorer\Main\"
FirstRunCustomizeArray(3) = "HKLM\Software\Microsoft\Internet
Explorer\Main\"

For Each Key In FirstRunCustomizeArray
WSHShell.RegWrite Key & "DisableFirstRunCustomize", 1, "REG_DWORD"
Next

Dim RunOnceArray(2)
RunOnceArray(0) = "HKLM\Software\Policies\Microsoft\Internet
Explorer\Main\"
RunOnceArray(1) = "HKCU\Software\Policies\Microsoft\Internet
Explorer\Main\"

For Each Key In RunOnceArray
WSHShell.RegWrite Key & "RunOnceComplete ", 1, "REG_DWORD"
WSHShell.RegWrite Key & "RunOnceHasShown ", 1, "REG_DWORD"
Next

Path = "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet
Settings\ZoneMap\Domains\microsoft.com\go\"
WSHShell.RegWrite Path & "http", 4, "REG_DWORD"
Hope that helps,

Mark D. MacLachlan
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: registry edit Mike Hall - MVP Windows Vista General Discussion 0 11-08-2008 09:36 PM
Cannot edit the registry Chuck Billow Windows Vista General Discussion 8 06-27-2008 04:57 PM
Registry Edit HELP Ted Windows Media Center 1 01-29-2007 08:58 PM
Edit Registry for IE7 SCL Internet Explorer 2 11-02-2006 06:12 PM
Edit Registry with GPO scott Active Directory 4 04-05-2005 03:36 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59