Example Code

Find default program according to extension using 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

Overview

This example shows how to use the System Exec.vi to use a cmd line prompt command to find the default program associated with a certain file extension

 

Description

The System Exec.vi is a way to send cmd line strings directly to the command line prompt. This VI shows how to use this function to know what program is associated with a specific file type

 

Requirements

  • LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Download the VI and open it.
  2. Type in the file extension (.vi, .dox, .ppt)Click on the Find Default Program button
  3. Click on the Set Default Programs button to open the Windows options to change the default program if desired

Additional Information or References

VI Block Diagram

Default.JPG

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

 

Daniel G.
Semiconductor & Wireless
National Instruments

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