Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How to verify registry entries with vbscript?

Posted on 2013-02-07
2
Medium Priority
?
487 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 2000 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

Technology Partners: 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

In this article we want to have a look at the directory attributes which are used by Microsoft to store the so called Security Identifiers (SID). These SIDs plays an important role in delegating and granting permissions and in authentication of trus…
This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

721 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