Photo Gallery Member List Search Calendars FAQ Ticket List Log Out


Change Registry Keys

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

 

 
  
  Printable Version
All Forums >> [Scripting] >> WSH & Client Side VBScript >> Change Registry Keys
  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 >>
 Change Registry Keys - 6/22/2004 5:23:32 AM   
  IcemanV1

 

Posts: 1
Score: 0
Joined: 6/22/2004
From: Canada
Status: offline
Is it possible to change the values in the Registry through script? If so, can you point me in the proper direction?
Thanks

Bill Hazelwood
No trees were harmed in the sending of this message, however a large number of electrons were terribly inconvienced.
 
 
Post #: 1
 
 Re: Change Registry Keys - 6/22/2004 11:11:17 AM   
  Coinneach

 

Posts: 8
Score: 0
Joined: 6/20/2004
From:
Status: offline
Hi there Iceman,

It sure is possible. Basically under the WSH your three main commands are RegRead, RegWrite and RegDelete.

Set WshShell = WScript.CreateObject("Wscript.Shell")
Ver = WshShell.RegRead ("HKEY_LOCAL_MACHINE\Software\Whatever\)
WshShell.RegWrite ("HKEY_LOCAL_MACHINE\SOFTWARE\Whatever","VERSION","REG_SZ")

and so on...

A key name is specified by a final backslash, a value name has no final backslash.

(in reply to IcemanV1)
 
 
Post #: 2
 
 Re: Change Registry Keys - 6/22/2004 11:25:47 AM   
  Coinneach

 

Posts: 8
Score: 0
Joined: 6/20/2004
From:
Status: offline
I put in parenthesis! Oops, that's a hang over from last scripting environment... I'm only a VB newbie. (but you can use parenthesis in VB script too! Kind of)

Set WshShell = WScript.CreateObject("Wscript.Shell")
Ver = WshShell.RegRead "HKEY_LOCAL_MACHINE\Software\Whatever\
WshShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Whatever","VERSION","REG_SZ"

(in reply to IcemanV1)
 
 
Post #: 3
 
 
 
  

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 >> Change Registry Keys 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