Solved

How to verify registry entries with vbscript?

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Well hello again!  Glad to see you've made it this far without giving up.  In this, the fourth installment of my popular series, I'm going to cover functions and subroutines, what they are, and why they are useful.  Just in case you stumbled onto th…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

813 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

13 Experts available now in Live!

Get 1:1 Help Now