Originally Posted By: matzas
Is there any way to get the Microsoft OS version as well?? (64Bit or 32Bit)..
thanks in advanced.
FYI - a lot of the O/S and Platform data needed for this type of inventory application can be returned with a single function call by using my WMISysInfo() UDF, including O/S and Platform architectures. This can greatly simplify such apps, and will improve performance (compared to individual WMIQuery() calls) by instantiating only a single WMI object. It returns the following array:
 Code:
;;RETURNS        40 element array
;;               0   short/full operating system description
;;               1   kernel description (Win2K, WinXP, Win2K3, Vista)
;;               2   operating system role (workstation, member server, domain controller)
;;               3   operating system service pack level
;;               4   operating system build level
;;               5   uni/multi-processor type
;;               6   Computer Name
;;               7   registered owner,organization
;;               8   Serial Number
;;               9   Install Date - YYYY/MM/DD hh:mm:ss
;;               10  Local Date/Time  - YYYY/MM/DD hh:mm:ss
;;               11  Last Boot Time - YYYY/MM/DD hh:mm:ss
;;               12  TimeZone info (Std, Daylight, Bias)
;;               13  Primary Domain Affiliation
;;               14  Installed Hotfix list
;;               15  OS Version (numeric)
;;               16  Future Use
;;               17  O/S Architecture
;;               18  Install Method (Clean, Upgrade, SysPrep)
;;               19  RAM/PageFile Info (location MinSize MaxSize)
;;               20  System Brand
;;               21  System Model
;;               22  System S/N
;;               23  System BIOS Revision
;;               24  Processor Type
;;               25  Processor Speed
;;               26  Processor Count (Physical)
;;               27  Processor Count (Logical)
;;               28  Processor Cores
;;               29  Physical Memory
;;               30  Fixed-Disk Labels, null if none
;;               31  Fixed-Disk Mount Point ("d:\" for drives, path for mounted volumes) (2K3 & higher)
;;               32  Fixed-Disk Drives (A:-Z:, or "MV:" for mounted Volumes)
;;               33  Fixed-Disk Capacities, bytes
;;               34  Fixed-Disk FreeSpace, bytes
;;               35  CD-ROM Disk List
;;               36  Connected Network Drives
;;               37  Hardware Architecture
;;               38  Processor DataWidth
;;               39  Future Use
, which looks like this when enumerated:
 Code:
00  Microsoft Windows 8 Pro
01  Unknown
02  Member Workstation
03
04  9200
05  Multiprocessor Free
06  ICWD011
07  user/
08  00178-10077-75869-AA763
09  2013/01/05 23:33:30
10  2014/01/07 11:36:02
11  2013/12/21 14:46:27
12  Eastern Standard Time / Eastern Daylight Time / 5
13  itcg.lan,ITCG
14
15  6.2.9200
16
17  64-bit
18  Clean
19  12224
20  Hewlett-Packard
21  HP Compaq 8100 Elite CMT PC
22  2UA04305JS
23  HPQOEM - 20091216
24  Intel(R) Core(TM) i7 CPU         860  @ 2.80GHz
25  2933
26  1
27  8
28  4
29  12817047552
30  ,Work,System Reserved
31  C:\,E:\,\\?\Volume{67bb6fab-57b9-11e2-be65-806e6f6e6963}\
32  C:,E:,MV:
33  749786361856,750153334784,366997504
34  362244497408,308648706048,113971200
35  B:,D:
36  <SNIP>W:=\\icwwcmsp01\WebSites,X:=\\icwismsp01\MediaRoot,Y:=\\icwifpsp01\SWDist
37  x64
38  64
39
The UDF can be downloaded from our web site's Kix UDF Library page. Note that the included _osid() function that generates standard "WINxxx" format names needs to be updated for Win-7/8 and Server 2012. This is returned in element 1, and was used by one of our internal apps so may not be an issue for others.. The UDF was updated today and will be available on our web site after 8pm EST tonight.

Also, if there are any suggestions for the "Future Use" fields, I'll see what I can do to update the UDF to include them.

Glenn


Edited by Mart (2014-01-09 05:01 PM)
Edit Reason: Updated title
_________________________
Actually I am a Rocket Scientist! \:D