Page 1 of 1

OS and architecture

Posted: 03 Nov 2010 13:11
by avery_larry
Anyone know of a little utility or something that can reliably/easily determine OS and architecture? I would only care about win 2000 server, XP, and newer.

Here's something that I think would not be completely reliable:

https://www.barracudanetworks.com/ns/pu ... _order.php

Most notably, %processor_architecture% will show x86 if you're using the wow64 cmd.

Surely something reliable has to exist, right? I mean -- people who program software have to know what environment they're in when their software is installed . . . ??

Re: OS and architecture

Posted: 03 Nov 2010 22:00
by !k

Re: OS and architecture

Posted: 04 Nov 2010 09:55
by avery_larry
Nice. But I want the OS architecture -- not the physical architecture.

It's for assigning registry values. I need to distinguish between using the HKLM\Software directly or using HKLM\Software\WOW6432Node.

Right now I'm using:

Code: Select all

  :: onlyWin7 and noWin7 identify Windows 7 machines.
set onlyWin7=rem
ver|find /i "[Version 6.1"&&set nowin7=rem&&set onlywin7=


  :: only64/no64 identify 64 bit OS
set only64=rem
reg query HKLM\software|find /i "wow6432node">nul &&set no64=rem&&set only64=

It seems to work for me for now, as I only have 32 bit XP and 64 bit Win7. I have other methods to ignore servers.

Re: OS and architecture

Posted: 04 Nov 2010 12:18
by !k
Run systeminfo
and find "X86-based PC" or "X64-based PC"

Re: OS and architecture

Posted: 11 Nov 2010 12:32
by avery_larry
That looks promising. Thanks.