With the CurrentMode property, you can set or retrieve the current mode for Windows Disk Protection. Note that the CurrentMode property can only be applied if the CurrentStatus property is WDP_ACTIVE. The CurrentMode properties listed in Table 1 directly correspond to the three levels of disk protection available when Windows Disk Protection is turned on.

Table 1: Windows Disk Protection Modes and Corresponding Disk Protection Levels

Windows Disk Protection mode Level of disk protection

WDP_MODE_DISCARD (0)

Remove All Changes at Restart

WDP_MODE_PERSIST (1)

Retain Changes Temporarily

WDP_MODE_COMMIT (2)

Retain All Changes Permanently

See Also