Solved

How to verify registry entries with vbscript?

Posted on 2013-02-07
2
482 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

Independent Software Vendors: 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

Welcome, welcome!  If you are new to the series and haven't been following along, please take a brief moment to review the first three installments: Part 1 (http://www.experts-exchange.com/Programming/Languages/Visual_Basic/VB_Script/A_266-VBScri…
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…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Are you ready to implement Active Directory best practices without reading 300+ pages? You're in luck. In this webinar hosted by Skyport Systems, you gain insight into Microsoft's latest comprehensive guide, with tips on the best and easiest way…

738 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