cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
vijji123
Level 6

is there any way to check the Opearating system bits on the target where i am instal

Hi,

I have one requirement where i need to check the Operating system bits on the target where i am going to install.Is there any built in action available in
Install Anywhere to check whether the box is 32 bit or 64 bit operating system.


Please help me this regard.


Thanks,
Vijji123
Labels (1)
0 Kudos
(9) Replies
pv7721
Level 20

Yes, there is a rule called "Check System Architecture".
0 Kudos
jerome_IA
Level 9

For me, at least on Linux, "Check System Architecture" often returns unknown while OS is 64-bit, it seems it gets similar output than command "uname -p".

So I implemented this OS check by:

For Linux: execute command "uname -m"
For Windows: Get Windows registry entry
Key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment
Name: PROCESSOR_ARCHITECTURE
0 Kudos
pv7721
Level 20

Yeah Jerôme you're perfectly right, depending on the IA version the architecture checks might not even work on certain platforms so indeed it is best to implement yourself!...
0 Kudos
jerome_IA
Level 9

I just reread my post and I have doubt concerning "PROCESSOR_ARCHITECTURE" which by its name suggest this is the processor architecture, not the OS installed is 32 or 64 .... I will double check what it exactly does .....

....

I double checked and confirm that comment #3 is correct and returns if Operating system is 32 or 64 bit.
0 Kudos
pv7721
Level 20

Well, on Windows i386 there should be a system variable called PROCESSOR_ARCHITECTURE which should be equal to x86; on x64 there should be another one called PROCESSOR_ARCHITEW6432 which should be equal to AMD64. On x64 Linux there should be another variable called HOSTTYPE which should be equal to x86_64.
0 Kudos
vijji123
Level 6

Check System Architecture will give whether the processor is 32 bit or 64 bit,
but i want to check Operating system bits.

i tried to use Check System Architecture, this is failing on boxes where 64 bit processor with 32 bit operating system installed on it.

do we have some thing property like 'VersionNT64' which is available in msi installer.

Thanks,
Vijji123
0 Kudos
pv7721
Level 20

First of all, on what platforms do you want to run this test?!? As I was saying, on Linuxes, the HOSTTYPE tells you the OS architecture (I've just done the test on a 64 machine which is installed with two different Linux architectures, 32 and 64. When switching to the 32 mode, the HOSTTYPE=i486.

And I strongly believe that the same applies to Windows, too, as according to this: http://superuser.com/questions/55596/how-do-i-determine-whether-my-windows-installation-is-64-or-32-bit

You can take a look at the PROCESSOR_ARCHITECTURE environment variable. This will be "x86" for a 32-bit OS and AMD64 for x86_64 (dunno the value for Itanium right now, but probably "IA64" or similar):
> echo %processor_architecture%
AMD64

> echo %processor_architecture%
x86

This even works with a 32-bit OS on a 64-bit-capable CPU
0 Kudos
vijji123
Level 6

Hi Vlad,

I am running this test on all windows platforms.

according to my knowledge 'X86' is 8086 processor which can be either 32 bit or 64 bit. on x86 processor we can install either 32-bit Operating System or 64-bit operating system.

so by just reading system architecture variable i can't decide Operating System type.

I think we need to see some registry entry for this Operating System bits.

Please add your comments.


Thanks,
Vijji123
0 Kudos
pv7721
Level 20

Vijji123, this whole architecture vs. OS is always tricky... Have you given a try what I've said in my last post?!? According to the information I have found, when interrogating the processor architecture variable, you should get x86 even on a 64 bit architecture, when you're in a 32 bit OS installed on a 64 bit architecture! And this for a good cause: a 64 bit OS will correctly report a 64 bit architecture because it is fully aware of it, but a 32 bit OS cannot know such a thing, therefore it reports x86 back, which means you're in a 32 bit OS, otherwise you'll have got AMD64! Is this clearer now?

Anyhow, I think this discussion is not IA specific, so you may want to look elsewhere on the Internet for a more suitable answer.
0 Kudos