On Your Own: Lab 34 Reading the Registry Using WMI
In this lab, you will practice reading the registry by using the WMI StdRegProv class.
Lab Instructions
Open Notepad.exe.
Add Option Explicit to the first line of your script.
Save the script as Lab34Solution.vbs.
Declare the following variables: strKeyPath, strComputer, objReg, subKey, and arrSubKeys. The Header information section of your script will look like the following:
Option Explicit Dim strKeyPath Dim strComputer Dim objReg Dim subKey Dim arrSubKeys
Define a constant to be used for HKLM. Its hex value is &H80000002. Your code for this looks like the following:
Const HKLM = &H80000002
Assign the Software\Microsoft path to the strKeyPath variable. It will look like the following:
strKeyPath = "SOFTWARE\Microsoft" ...
Get Microsoft® Windows® Scripting Self-Paced Learning Guide now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.