Virus scan in progress. Please wait to download attachments.
This simple example shows the use of System Exec.vi to invoke the Volume Control of Win2000/ WinXP/Win 7 from within the LabVIEW Development environment.
The System Exec VI can be used to launch other Windows-based applications by way of the system level command line. In this case, the code launches the Volume Control executable included in the Windows operating system.
Depending on what operating system is being used (Windows 2000, Windows XP or Windows 7), the path to the executable, sndvol32.exe, is slightly different. For this reason an enum and a case structure allow the user to switch between different operating systems and their corresponding paths. In Windows 7, the name of the executable is slightly altered: SndVol.exe. The code is modified to work with Windows 7.
LabVIEW 2012 or later
Steps to Implement or Execute Code
Open "Open Volume Control_System Exec_LV2012_NI Verified" VI and select your operating system (Win2000, WinXP or 7) in the drop-down menu on the front panel.
Windows Volume Control should pop up and allow you to adjust the volume on your system.
Additional Information or References
**This document has been updated to meet the current required format for the NI Code Exchange.**
Example code from the Example Code Exchange in the NI Community is licensed with the MIT license.