Solved

How to verify registry entries with vbscript?

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Script to copy or move mouse-selected collection of files plus targets referenced by shortcuts (.lnk) The purpose of this article is to help illuminate the real challenges and options available (where they may exist) for utilizing simple scriptin…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…
This video explains how to create simple products associated to Magento configurable product and offers fast way of their generation with Store Manager for Magento tool.

760 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

22 Experts available now in Live!

Get 1:1 Help Now