KFadgen Posted March 20, 2011 Report Share Posted March 20, 2011 I'm trying to determine if my application is running on a 32 or 64bit version of Windows. The application is going to be calling some external code (.exe) which has two separate versions depending on which OS they're running on. There is a very nice .NET method available which would work perfectly: http://msdn.microsof...8VS.100%29.aspx but it's only supported in .NET 4.0 which as of LabVIEW 2010 SP1 we don't have access to. I could try to write an external dll to do the check for me, but I wanted to see if anyone out there had an idea of how to do this from within LabVIEW. Thanks, Keith Quote Link to comment
ShaunR Posted March 20, 2011 Report Share Posted March 20, 2011 I'm trying to determine if my application is running on a 32 or 64bit version of Windows. The application is going to be calling some external code (.exe) which has two separate versions depending on which OS they're running on. There is a very nice .NET method available which would work perfectly: http://msdn.microsof...8VS.100%29.aspx but it's only supported in .NET 4.0 which as of LabVIEW 2010 SP1 we don't have access to. I could try to write an external dll to do the check for me, but I wanted to see if anyone out there had an idea of how to do this from within LabVIEW. Thanks, Keith The "Conditional disable" has pre-defined conditions for different OSs (bitness is one of them). Quote Link to comment
KFadgen Posted March 21, 2011 Author Report Share Posted March 21, 2011 The "Conditional disable" has pre-defined conditions for different OSs (bitness is one of them). I tried the conditional disable structure and I'm not getting the behavior I was expecting. I'm running LabVIEW 2010 SP1 (32bit) on my laptop which has Window7 Pro 64bit installed on it. I setup the conditional disable as suggested in a test VI. If I execute the VI, it is always selecting the 32 bit code in the structure. Is there something obvious I'm doing wrong or missing? Quote Link to comment
ShaunR Posted March 21, 2011 Report Share Posted March 21, 2011 (edited) I tried the conditional disable structure and I'm not getting the behavior I was expecting. I'm running LabVIEW 2010 SP1 (32bit) on my laptop which has Window7 Pro 64bit installed on it. I setup the conditional disable as suggested in a test VI. If I execute the VI, it is always selecting the 32 bit code in the structure. Is there something obvious I'm doing wrong or missing? IC. The conditional disable will give you the bitness of Labview you are using. For the OS you can use the OS.Name property node. Edited March 21, 2011 by ShaunR Quote Link to comment
KFadgen Posted March 21, 2011 Author Report Share Posted March 21, 2011 I tried that, but I'm not getting an x64 in the reply. For Win7Pro 64bit I'm getting the following for the OS properties: OS.Name = WindowsNT OS.DetailName = Windows 7 Professional OS.Version = 6.1 OS.BuildNumber = 7600 -Keith Quote Link to comment
Michael Aivaliotis Posted March 21, 2011 Report Share Posted March 21, 2011 Do a test to see if C:\Program Files (x86) exists using the "Check if File or Folder Exists.vi". If it does exist, it means you are running 64bit Windows. Quote Link to comment
Popular Post Rolf Kalbermatter Posted March 21, 2011 Popular Post Report Share Posted March 21, 2011 Do a test to see if C:\Program Files (x86) exists using the "Check if File or Folder Exists.vi". If it does exist, it means you are running 64bit Windows. This is a hack, since different language versions of Windows will probably call this differently. You Americans need to realize that the world doesn't only exist of English speaking people . And of all people I would have thought you Michael should know. A much better way would be something along these lines. Tested only on 32 Bit Windows XP for the moment but in theory it should work right on all versions of Windows XP and newer. LV2010 WINAPI Is 64 Bit OS.vi 3 Quote Link to comment
Mellroth Posted March 21, 2011 Report Share Posted March 21, 2011 I tried that, but I'm not getting an x64 in the reply. How about this? /J Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.