Click or drag to resize
HardDiskVolumeSerialFilterType Enumeration
Enumeration defining the different types of supported filters used when retrieving the HardDiskVolumeSerialIdentifierAlgorithm output from the GetIdentifiers method.

Namespace: com.softwarekey.Client.Licensing
Assembly: PLUSManaged (in PLUSManaged.dll) Version:
public enum HardDiskVolumeSerialFilterType
  Member nameValueDescription
NoFilter0Omits all filtering and returns identifiers for all drives/mount points. This can include removable storage devices, mapped network drives, etc...
OperatingSystemRootVolume1 Only generates an identifier for the drive or mount point on which the operating system is installed. This is typically the C:\ drive on Microsoft Windows, and is always / (root) for Unix platforms. This is the default filter on Linux and macOS.
StandardFixedOnly2 This filters out drives that report themselves as anything other than fixed. This is the default filter on Microsoft Windows, and is backward compatible versions of PLUSManaged earlier than Since many removable drives report themselves as fixed, you should consider using the WmiFixedVolume or OperatingSystemRootVolume filters on Windows, and you should use the OperatingSystemRootVolume filter on Linux and macOS.
WmiFixedOnly3 If using Windows Management Instrumentation queries (WMI) is an option for you, this provides the most information with the most reliable filtering. Unlike StandardFixedOnly, this is not mislead by USB drives that still report themselves as fixed drives. Any attempt to use this on platforms other than Windows will cause a PlatformNotSupportedException to be thrown.
Caution note Caution

When using a filter other than OperatingSystemRootVolume, it is possible for your users to experience noticeably sluggish performance. This is because every filter except OperatingSystemRootVolume must query information on all drives, which can take some time when a system has many drives installed (especially if some or all of these drives power-down to minimize energy consumption).

Caution note Caution

On Microsoft Windows, the StandardFixedOnly is the default filter, and produces behavior which is backward-compatible with versions of PLUSManaged earlier than However, this filter relies strictly on whether the drive reports itself as fixed or not, and many removable drives (particularly internal drives placed in removable/USB enclosures) report themselves as fixed drives. If this is cause for concern or problems, please consider using the OperatingSystemRootVolume on any supported platform, or the WmiFixedOnly filter on Windows.

In Linux and macOS, OperatingSystemRootVolume is the default filter. Our testing has found that many removable drives are reported as fixed in these platforms (even when the same drive shows as removable in Windows). Since this makes the StandardFixedOnly filter rather unreliable in this scenario, we strongly recommend using only the OperatingSystemRootVolume filter in Linux and macOS.

Caution note Caution

The WmiFixedOnly filter is only supported on Windows. Attempting to use it on other platforms cause a PlatformNotSupportedException to be thrown. You can leverage the System.Environment.OSVersion.Platform property to conditionally use this filter and avoid this exception.

Caution note Caution

On macOS, this algorithm is only supported while targeting the 4.0 (v4.0.30319) framework or later, and requires the presence of the MonoMac.dll assembly to function. Any attempt to use it without this assembly present, or while targeting older framework versions, will result in unhandled exceptions being thrown.

See Also