1.11 Storage Device Control Policy Interface

The Storage Device Control Policy interface provides methods for getting and setting the enforcement for different volume types (fixed, optical, removable, and floppy), and for getting and setting the enforcement for the AutoPlay and AutoRun features.

1.11.1 Data Types

Volume Types:

unknown — Volume drive type cannot be determined.

fixed — Local hard drive located on a removable system bus.

optical — CD-ROM and DVD drives.

removable — Volumes on a removable bus or volumes marked as removable by the system.

floppy — Floppy disk drives.

Volume Access:

inherit — Immediately apply setting as defined by the current policy. Used to clear the script setting.

disable — Block all access to the volume. Disable in Device Manager.

deny — Block read and write access to the volume, but leave volume enabled in Device Manager.

read_only — Allow the volume to be read from, but block write operations.

read_write — Allow full access to the volume.

Auto-Play Access:

inherit — Immediately apply setting as defined by the current policy. Used to clear the script setting.

allow — Allow Windows to initiate an auto-play (or auto-run) request when mounting a volume.

block_auto_play — Do not allow Windows to initiate an auto-play (or auto-run) request when mounting a volume.

block_auto_run — Do not allow Windows to initiate an auto-run request when mounting a volume; auto-play requests are allowed.

Enforcement Type:

disable — Disable the setting and enforce immediately.

enable — Enable the setting and enforce immediately.

inherit — Immediately apply enforcement as defined by the current policy. Used to clear the script setting.

1.11.2 AutoPlay Methods

The AutoPlay methods get and set the enforcement for the AutoPlay and AutoRun features.

string Query.GetAutoPlayEnforcement

Description:

Gets the enforcement for auto-play.

Returns:

One of the enforcement types listed in Data Types.

string Query.GetAutoPlayPolicyEnforcement

Description:

Gets the auto-play enforcement type, as set by policy.

Returns:

One of the enforcement types listed in Data Types.

string Query.GetAutoPlayScriptEnforcement

Description:

Gets the auto-play enforcement type, as set by script.

Returns:

One of the enforcement types listed in Data Types.

int Action.SetAutoPlayEnforcement(string enforcement)

Description:

Sets the enforcement for auto-play.

Parameters:

enforcement — One of the enforcement types listed in Data Types.

1.11.3 Volumes Methods

The Volumes methods get and set the enforcement for fixed, optical, removable, and floppy volumes.

string Query.GetVolumeEnforcement(string volumeType)

Description:

Gets the effective enforcement for volumes of the specified type. The effective enforcement is determined by resolving any conflicts between the policy enforcement type and the script enforcement type. The script enforcement type overrides the policy enforcement type; if the script enforcement type is inherit, the policy enforcement type is used.

Parameters:

volumeType — One of the volume types listed in Data Types.

Returns:

One of the enforcement types listed in Data Types.

string Query.GetVolumePolicyEnforcement(string volumeType)

Description:

Gets the enforcement for volumes of the specified type, as set by policy.

Parameters:

volumeType — One of the volume types listed in Data Types.

Returns:

One of the enforcement types listed in Data Types.

string Query.GetVolumeSciptEnforcement(string volumeType)

Description:

Gets the enforcement for volumes of the specified type, as set by script.

Parameters:

volumeType — One of the volume types listed in Data Types.

Returns:

One of the enforcement types listed in Data Types.

int Action.SetVolumeEnforcement(string volumeType, string enforcement)

Description:

Sets the enforcement for volumes of the specified type.

Parameters:

volumeType — One of the volume types listed in Data Types except for fixed. You cannot set an enforcement type for a fixed volume.

enforcement — One of the enforcement types listed in Data Types.