hpops
asked on
Modify multiple registry keys using vbscript
Hello,
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\SOFTWA RE\Microso ft\Windows NT\CurrentVersion\Winlogon ]
[HKEY_LOCAL_MACHINE\SOFTWA RE\Novell\ NWGINA\Wel come Screen]
"Bitmap"="Updates.BMP"
"Header Message"="Updates are installing..."
[HKEY_LOCAL_MACHINE\SYSTEM \CurrentCo ntrolSet\S ervices\Kb dclass]
"Start"=dword:00000004
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\SOFTWA
[HKEY_LOCAL_MACHINE\SOFTWA
"Bitmap"="Updates.BMP"
"Header Message"="Updates are installing..."
[HKEY_LOCAL_MACHINE\SYSTEM
"Start"=dword:00000004
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
...are we done here?
ASKER
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.