Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check if registry key exists?

Status
Not open for further replies.

hskr4evr

Technical User
Sep 17, 2002
35
0
0
US
With a vbscript, I want to check if the following registry key exists...

HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\SubSystems\Posix

How can I do this in a vbscript?? If it exists, I want to delete it.

Thanks.
 
hskr4evr,

Definitely possible. WMI/WSH based script can enumerate the keys and you just need to create a function to test for the key.

For some related, but not exact references checkout the following site. Lots of great scripts.

Use Wmi To Read Registry Value...

Enumerate Registry Values and Types

Check out Scriptomatic.. Tool assists in writing WMI scripts that can be executed via cscript or wscript.

Hope this helps.
DougCranston
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top