Modify multiple registry keys using vbscript

Posted on 2006-03-20
Last Modified: 2012-05-05

I’m looking for a way to modify some existing registry keys using vbscript. I've figured out how to change one, but am having trouble figuring out to change multiple values. I’d like the registry changes mentioned at the bottom to happen when a user clicks on the YES button on my messagebox.

So far my script looks like this.

Dim wshShell, Response

Response = msgbox("WARNING - You need the latest updates."_
 & vbcrlf & vbcrlf & "Please click YES to install these updates now."_
 & vbcrlf & vbcrlf & "Press NO to temporarily suppress this message."_  
  & vbcrlf & vbcrlf & "Please call the Helpdesk if you have any problems or questions."_
, 52, "IMPORTANT - Please read before continuing.")
if response = vbyes then

'Do this action if they click YES
‘Put registry changes here

Set wshShell = Nothing
end if

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon]

"Header Message"="Updates are installing..."

Question by:hpops
    LVL 6

    Accepted Solution


    has a good article on updating the registry with scripts.

    This is a site with different examples of managing the Registry, including creating multi string values.

    HTH :)
    LVL 6

    Expert Comment

    ...are we done here?

    Author Comment

    I was looking for a direct answer to my question with some example code. With the links you provided and some trial and error I got it working. Thanks for your help.

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
    The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
    Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    745 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

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now