LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Detect CPU architecture during runtime and install

Is it possible to have one install file that will install either 32 bit or 64 bit program automatically on a cpu without the user selecting anything?

 

Else, is there a CVI built in function for detecting whether the CPU is 32 bit or 64 bit?  My program calls an external .exe that has a version for each.

 

I see the GetWinOSVersion and can call it on my current computer, but am not sure what gets returned for Windows7 or 64bit vs 32 bit.

 

Thanks

0 Kudos
Message 1 of 4
(3,159 Views)

During runtime, i found this global variable when I was told my easytab panel wasn't supported ... awesome I know

 

 

#if defined(_NI_mswin64_) && _NI_mswin64_
#error this custom control is not supported in 64-bit applications
#endif

 

0 Kudos
Message 2 of 4
(3,140 Views)

I guess another question is if I am installing on a 64 bit machine, and need to add Registry Keys and access them but only creating a 32 bit exe, Do I need to still create a 64-bit install, but include the 32 bit dlls/exes? or would just installing my normal 32-bit application work?

 

The reason I ask is I tried installing my normal 32 bit application which creates a registry key for the installed dir, but I am not seeing this in regedit.

 

Sorry I am new to the 64 bit stuff and want to make sure I have everything working.

 

Thanks

0 Kudos
Message 3 of 4
(3,137 Views)

Okay, I found out and learned more about 64 bit computers and their registry.  Apparently the 32 bit app does write to the registry, just not in the "exact" location of where it would normally be but in a WOW folder, where it is redirected.

 

This link was helpful - http://msdn.microsoft.com/en-us/library/aa384232(v=VS.85).aspx

 

So my issues are resolved essentially since I can just use my 32 bit app, although others may still be interested in learning about a one click install for 32 or 64 bit computers.

0 Kudos
Message 4 of 4
(3,130 Views)