Solved

How to verify registry entries with vbscript?

Posted on 2013-02-07
2
484 Views
Last Modified: 2013-02-07
Hello,

I would like to know how to check registry keys, names and its values with vb-script ?

Thanks,
0
Comment
Question by:namerg
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 

Author Comment

by:namerg
ID: 38864875
In other words i would like to know if "SyncMode5" exists in the following path HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings" using vbscript.

Thanks,
0
 
LVL 65

Accepted Solution

by:
RobSampson earned 500 total points
ID: 38866023
Hi, this should work for you.

Regards,

Rob,

strValue = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\SynMode5"
strData = CheckRegValue(strValue)
WScript.Echo strData

strValue = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyEnable"
strData = CheckRegValue(strValue)
WScript.Echo strData

Function CheckRegValue(strRegPath)
	Set objShell = CreateObject("WScript.Shell")
	strReturn = "<NOT FOUND>"
	On Error Resume Next
	strReturn = objShell.RegRead(strRegPath)
	Err.Clear
	On Error GoTo 0
	CheckRegValue = strReturn
End Function

Open in new window

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Recently I finished a vbscript that I thought I'd share.  It uses a text file with a list of server names to loop through and get various status reports, then writes them all into an Excel file.  Originally it was put together for our Altiris server…
Hello again, all.  For those of you that have been following along, you'll know that this is my third article on this topic (though it is not Part III).  This article is sort of remedial, and probably the topic with which I should have started the s…
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…

626 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