April 2004
Beginner
416 pages
11h 3m
English
In this lab, you will practice reading the registry by using the WMI StdRegProv class.
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" ...
Read now
Unlock full access