ExamplesOpening a registry key, listing keys, and closing the registry key (Windows version only)
The OPEN WINKEY, LIST WINKEYS, and CLOSE WINKEY commands are similar to the OPEN KEY, LIST KEYS, and CLOSE KEY commands described in section 3, except that they are working with the registry of a running Windows system (as are all commands in this section). The following example opens the System key, assigns the key to 0, lists any subkeys contained within the key, and then closes the key. The System key is located in HKLM branch of the registry (HKEY_LOCAL_MACHINE). Note that the branch of the registry under which the key exists must be specified when using the OPEN WINKEY command.
Creating and deleting a registry key (Windows version only)
The following example uses the OPEN WINKEY command with the /c option to create and open a new key under the System key in the HKLM branch of the registry. It then creates a new subkey under the new key. It then opens the System key itself and deletes both the new key and the subkey under it with the DEL WINKEY command using the /s option.
Listing, Setting, and Deleting Registry Values (Windows version only)
The LIST WINVALUE, LIST WINVALUES, SET WINVALUE, and DEL WINVALUE commands work in similar fashion to the LIST VALUE, LIST VALUES, SET VALUE, and DEL VALUE covered in section 3. The following example commands demonstrate their use.
|