This content is not available in your preferred language.

The content is shown in another available language. Your browser may include features that can help translate the text.

Read Disk Drive Properties in Windows Using LabVIEW

Updated Aug 30, 2023

Reported In

Software

  • LabVIEW

Operating System

  • Windows

Other

  • Microsoft Windows

Issue Details

I would like to be able to read disk drive labels, disk space, or disk type from LabVIEW.

Solution

A simple way to do this is to leverage the Windows kernel32 DLL. Use the Call Library Function Node in LabVIEW to call this DLL, and then use functions like GetVolumeInformationA or GetDriveTypeA to read the properties you need.

For example, to get the disk drive name:
 
CLFN Kernel32.png
VolName.png

You can also use Command Prompt and the System Exec VI  with Windows Management Instrumentation Command-line (WMIC) commands.

Additional Information

For a list of drives in a machine you can use the List Folder Function with an empty path wired as the input.