Jump to content
KFadgen

Determine 32 or 64Bit OS - Windows

Recommended Posts

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

Share this post


Link to post
Share on other sites

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).

Share this post


Link to post
Share on other sites

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?

post-689-0-31920200-1300666060_thumb.png

Share this post


Link to post
Share on other sites

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 by ShaunR

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.