Registered member login:
Register Now
Altirigos » Deployment Solution » Scripting/Tools/Docs » Scripting Registry Changes

» Current Poll
Do you leave the Aclient enabled?
YES - 82.68%
105 Votes
NO - 17.32%
22 Votes
Total Votes: 127
You may not vote on this poll.
» Stats
Members: 9,479
Threads: 11,743
Posts: 55,255
Top Poster: Nick (4,981)
Welcome our newest member, timmaki
» Online Users: 40
1 members and 39 guests
whiggy
Most users online at once 294, 06-30-2007 at 12:24 PM.
» March 2010
S M T W T F S
28 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 123
Reply
Old 03-16-2009, 04:56 PM   #1 (permalink)
 
Status: Junior Altiris Admin
Join Date: 01-07-2007
Location: California
Posts: 16


Scripting Registry Changes

Hi all,

We are trying to come up with a script to remove the Automatic Configuration Script proxy address in IE properties on the LAN Settings page.

As is often the case when we want to do something new, we try to take something that worked before and modify it to meet our new purpose. To that end, here is a script that I know works.

'vbscript
On Error Resume Next
Dim objShell
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Novell\Location Profiles\Services\{1E6CEEA1-FB73-11CF-BD76-00001B27DA23}\Default\Tab1\Server","","REG_SZ"
WScript.Quit ' Tells the script to stop and exit.

We use this to clear out the Default Netware Server name on computers that have this set and it works great.

But . . .this script does not work.

'vbscript
On Error Resume Next
Dim objShell
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.RegWrite objShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Windows\Curr entVersion\Internet Settings\AutoConfigURL","","REG_SZ"
WScript.Quit ' Tells the script to stop and exit.

Only real difference that I can see is that we are writing to the CURRENT USER section but we run this script when a user is logged on and nothing happens.

Any suggestions?

Thanks.

Dave
dmessmer is offline   Reply With Quote
Old 03-16-2009, 05:12 PM   #2 (permalink)
 
Status: Super Altiris Admin
Join Date: 10-28-2005
Location: Colorado
Posts: 1,363


Can you not make a Group Policy to handle this?

If not see this: IE - Automatically Detect Settings - SOLVED
__________________
Brandon
Brandon is offline   Reply With Quote
Old 03-17-2009, 03:43 PM   #3 (permalink)
 
Status: Junior Altiris Admin
Join Date: 01-07-2007
Location: California
Posts: 16


Quote:
Originally Posted by Brandon View Post
Can you not make a Group Policy to handle this?
We don't use Group Policies. We use Novell servers (NDS) and don't use Zenworks. We use Deployment Server for as much as we can.

Quote:
Originally Posted by Brandon View Post
If not see this: IE - Automatically Detect Settings - SOLVED
Thanks, I'll try to modify one of those scripts.

Dave
dmessmer is offline   Reply With Quote
Old 03-17-2009, 04:18 PM   #4 (permalink)
 
Status: Junior Altiris Admin
Join Date: 01-07-2007
Location: California
Posts: 16


When I run the modified script:

const HKEY_CURRENT_USER = &H80000001
strComputer = "."

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

strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Interne t Settings"
strStringValueName = "AutoConfigURL"
oReg.DeleteValue HKEY_CURRENT_USER,strKeyPath,strStringValueName

I get the following messages in the Command Prompt window.

C:\>const HKEY_CURRENT_USER = & H80000001
'const' is not recognized as an internal or external command,
operable program or batch file.
'H80000001' is not recognized as an internal or external command,
operable program or batch file.
C:\>strComputer = "."
'strComputer' is not recognized as an internal or external command,
operable program or batch file.
C:\>Set oReg=GetObject("winmgmts:{impersonationLevel=imper sonate}!\\" & _
'_' is not recognized as an internal or external command,
operable program or batch file.
C:\>strComputer & "\root\default:StdRegProv")
'strComputer' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.
C:\>strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Interne t Settings"
'strKeyPath' is not recognized as an internal or external command,
operable program or batch file.
C:\>strStringValueName = "AutoConfigURL"
'strStringValueName' is not recognized as an internal or external command,
operable program or batch file.
C:\>oReg.DeleteValue HKEY_CURRENT_USER,strKeyPath,strStringValueName
'oReg.DeleteValue' is not recognized as an internal or external command,
operable program or batch file.

Is there something else I need to add at the beginning of the script to tell the job to use WMI?

Thanks.

Dave
dmessmer is offline   Reply With Quote
Old 03-17-2009, 05:56 PM   #5 (permalink)
 
jenifer.arnold's Avatar
 
Status: Super Altiris Admin
Join Date: 01-23-2006
Location: Anchorage, Alaska, USA
Posts: 817


Check out this post by ksweet -- Set HKEY_CURRENT_USER Registry key via the local system account
__________________
Jenifer Arnold
Information Technology Division
Anchorage Water & Wastewater Utility
jenifer.arnold is offline   Reply With Quote
Old 03-18-2009, 04:44 AM   #6 (permalink)
 
Status: Super Altiris Admin
Join Date: 11-09-2006
Location: London
Posts: 718


Quote:
Originally Posted by dmessmer View Post
When I run the modified script:

const HKEY_CURRENT_USER = &H80000001
strComputer = "."

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

strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Interne t Settings"
strStringValueName = "AutoConfigURL"
oReg.DeleteValue HKEY_CURRENT_USER,strKeyPath,strStringValueName

I get the following messages in the Command Prompt window.

C:\>const HKEY_CURRENT_USER = & H80000001
'const' is not recognized as an internal or external command,
operable program or batch file.
'H80000001' is not recognized as an internal or external command,
operable program or batch file.
C:\>strComputer = "."
'strComputer' is not recognized as an internal or external command,
operable program or batch file.
C:\>Set oReg=GetObject("winmgmts:{impersonationLevel=imper sonate}!\\" & _
'_' is not recognized as an internal or external command,
operable program or batch file.
C:\>strComputer & "\root\default:StdRegProv")
'strComputer' is not recognized as an internal or external command,
operable program or batch file.
The system cannot find the path specified.
C:\>strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Interne t Settings"
'strKeyPath' is not recognized as an internal or external command,
operable program or batch file.
C:\>strStringValueName = "AutoConfigURL"
'strStringValueName' is not recognized as an internal or external command,
operable program or batch file.
C:\>oReg.DeleteValue HKEY_CURRENT_USER,strKeyPath,strStringValueName
'oReg.DeleteValue' is not recognized as an internal or external command,
operable program or batch file.

Is there something else I need to add at the beginning of the script to tell the job to use WMI?

Thanks.

Dave
It's still a VBScript so you still need the 'vbscript at the start to tell the AClient to use WScript to run the script.

Wscript will work out when to use WMI from the vbscript.
andykn is offline   Reply With Quote
Old 03-18-2009, 01:56 PM   #7 (permalink)
 
Status: Junior Altiris Admin
Join Date: 01-07-2007
Location: California
Posts: 16


Quote:
Originally Posted by andykn View Post
It's still a VBScript so you still need the 'vbscript at the start to tell the AClient to use WScript to run the script.

Wscript will work out when to use WMI from the vbscript.
Thanks, that got it to work when I supplied the specific user name and password in the Run Script Job.

Quote:
Originally Posted by jenifer.arnold View Post
Check out this post by ksweet --
Thanks for that. It's going to take awhile to whittle that down for what I need. I'm not that experienced with vbscript. Gives me a great start though.

Dave
dmessmer is offline   Reply With Quote
Old 03-18-2009, 02:44 PM   #8 (permalink)
 
Status: Super Altiris Admin
Join Date: 10-28-2005
Location: Colorado
Posts: 1,363


Post 13 in the link I provided details how to do this with HKLM instead of HKCU, no VBS requried. I suggest you read that entrie thread for more information.
__________________
Brandon

Last edited by Brandon; 03-18-2009 at 05:08 PM..
Brandon is offline   Reply With Quote
Old 03-18-2009, 03:11 PM   #9 (permalink)
 
Status: Super Altiris Admin
Join Date: 10-28-2005
Location: Colorado
Posts: 1,363


While I would absolutely not reccomend handling this with an MSI, an article on the same thing was posted on juice today. https://www-secure.symantec.com/conn...user-windows-x
__________________
Brandon
Brandon is offline   Reply With Quote
Old 03-18-2009, 04:16 PM   #10 (permalink)
 
Status: Junior Altiris Admin
Join Date: 01-07-2007
Location: California
Posts: 16


Quote:
Originally Posted by Brandon View Post
Post 13 in the link I provided details how to do this with HKLM instead of HKCU, no VBS requried. I suggest you read that entrie thread for more information.
Now THAT . . . is slick. Thanks for pointing that out to me . . . again.

That actually works better at what we are trying to accomplish than the HKCU route since in our environment the settings would be machine-based not user-based anyway.

Dave
dmessmer is offline   Reply With Quote
Old 03-18-2009, 05:10 PM   #11 (permalink)
 
Status: Super Altiris Admin
Join Date: 10-28-2005
Location: Colorado
Posts: 1,363


No problem, I hope it works and is a little easier to deploy.
__________________
Brandon
Brandon is offline   Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
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 On

Powered by vBadvanced CMPS v3.0 RC2

All times are GMT -4. The time now is 06:52 PM.


Powered by vBulletin® Version 3.7.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
vB.Sponsors
Altirigos