HardDiskVolumeSerialFilterType Enumeration |
Namespace: com.softwarekey.Client.Licensing
Member name | Value | Description | |
---|---|---|---|
NoFilter | 0 | Omits all filtering and returns identifiers for all drives/mount points. This can include removable storage devices, mapped network drives, etc... | |
OperatingSystemRootVolume | 1 | 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. | |
StandardFixedOnly | 2 | 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 1.11.3.0. 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. | |
WmiFixedOnly | 3 | 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 |
---|
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 |
---|
On Microsoft Windows, the StandardFixedOnly is the default filter, and produces behavior which is backward-compatible with versions of PLUSManaged earlier than 1.11.3.0. 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 |
---|
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 |
---|
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. |