Unleashing StdRegProv

The nice aspect of StdRegProv is the power it brings to a script. In Chapter 1, our tutorial script illustrated using RegRead. You could follow the same methodology and use the RegWrite and RegDelete methods of WshShell, but there are limitations to using WshShell to work with the registry: you cannot work remotely, and there is no enumeration. However, all are resolved by using StdRegProv. It has 16 methods defined. These methods and a description of what they can do are listed in Table 17-2.

Table 17-2. StdRegProv Methods

Method

Description

CheckAccess

Verifies that the user has the specified access permissions

CreateKey

Creates a subkey

DeleteKey

Deletes a subkey

DeleteValue

Deletes a named value

EnumKey

Enumerates subkeys

EnumValues ...

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.