Example Code

How to Launch the Properties Window of a Device Listed in Device Manager from LabVIEW

Products and Environment

This section reflects the products and operating system used to create the example.

To download NI software, including the products shown below, visit ni.com/downloads.

    Software

  • LabVIEW

Code and Documents

Attachment

Download All

Overview

This example launches the Properties Window of a Device Listed in Device Manager from LabVIEW

 

Description

How can an application in LabVIEW open Windows Device Manager and view the properties of a specific device. There are a few approaches that can be used.

Firstly, there is the DevCon command-line utility which functions as an alternative to Device Manager available from the Microsoft website.

Microsoft:The DevCon command-line utility functions as an alternative to Device Manager

Then by using the System Exec.vi these command-lines can created by LabVIEW. Please refer to the following document from the Microsoft support pages for more information on how to invoke the Device Manager dll (devmgr.dll) from the command line.

 Microsoft: How to invoke the device Properties dialog box from the application or from a command pro...

 Secondly, you can use the attached example Device Properties 2012 NIVerified.vi (formerly named Call Library Node.vi)

 

Requirements

 LabVIEW Full Development System 2012 or compatible, Microsoft Windows OS


Steps to Implement or Execute Code

  1. Enter the Device Instance Path/ID. Can be found at: Windows Device Manager>>(select   device)>>Properties>>Details>>Device Instance Path>>Right click>>Copy
  2. Enter Show Device Manager value, 0=Show Properties Window dialog box and 1=Show Device Manager
  3. Open Block Diagram, make sure the FindWindow refers to the %Windows\System32\user32.dll. Also, the devmgr.dll:DevicePropertiesA refers to %Windows\System32\devmgr.dll
  4. Run the VI and the device Properties Window will open

Notes
The Device Instance Path often looks like the below
PCI\VEN_xxxx&DEV_xxxx&SUBSYS_xxxx&REV_xx 

 

Additional Information or References

VI Block Diagram

 5165.PNG

 

**This document has been updated to meet the current required format for the NI Code Exchange. **

 

 

Kind Regards
James Hillman
Applications Engineer 2008 to 2009 National Instruments UK & Ireland
Loughborough University UK - 2006 to 2011
Remember Kudos those who help! 😉

Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.

Comments
Meng-Shiang.Lin
Member
Member
on

A good and useful instruction, but I can't open this vi with LabVIEW 8.5.1.

San_Punt
Member
Member
on

very nice, thanks