To download NI software, including the products shown below, visit ni.com/downloads.
Overview
This VI uses parses the string output of the System Exec VI to determine if the Windows Environment is 32-bit or 64-bit.
Description
The System Exec VI is called with the command "wmic os get os architecture", which returns:
-------------------------------------------------------
Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C:\>wmic os get osarchitecture
OSArchitecture
64-bit
C:\>
-------------------------------------------------------
This string output is then parsed to return the "32" or "64" and highlight an appropriate LED on the front panel.
Requirements
Steps to Implement or Execute Code
Additional Information or References
VI Snippeto of Block Diagram
**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.
The above snippet is good, but it fails for example for OS win 10 that has a different reply to command "wmic os get os architecture". I suggest this more general implementation with Regular Expression: