Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Vista General Discussion > Determine OS version and bit type from the registry

Reply
Thread Tools Display Modes

Determine OS version and bit type from the registry

 
 
RobM
Guest
Posts: n/a

 
      12-01-2008
Hi,

I need to find out if there is a way to determine the operating system
version and whether it is 32 or 64-bit by using the registry. I am aware of
the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
NT\CurrentVersion\CurrentVersion. Windows XP would be 5.1 and Vista would be
6.0. I noticed that both the 32 and 64 bit versions are set to version 6.0.
Does anyone know where to find the bit version installed in the registry?
System Information is able to tell so it must be in the registry somewhere.

I have been searching the internet for awhile without much luck so far.

--

Thanks,

Rob
 
Reply With Quote
 
 
 
 
Mark L. Ferguson
Guest
Posts: n/a

 
      12-01-2008
--OS Architecture.VBS--cut here--
' Mark L. Ferguson 2008
' script to detect 32 or 64 bit architecture
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" _
& strComputer & "\root\cimv2")
Set colOperatingSystems = objWMIService.ExecQuery _
("Select * from Win32_OperatingSystem")
For Each objOperatingSystem in colOperatingSystems
Wscript.Echo objOperatingSystem.Caption & _
" " & objOperatingSystem.OSArchitecture
Next
--end file--cut here--

--
Use the "Ratings" feature. It helps the new users.
Please use the Communities guidelines when posting.
http://www.microsoft.com/wn3/locales...help_en-us.htm
Mark L. Ferguson MS-MVP
https://mvp.support.microsoft.com/profile/Mark.Ferguson

"RobM" <> wrote in message
news:8A55D8EB-D956-4D0C-B978-...
> Hi,
>
> I need to find out if there is a way to determine the operating system
> version and whether it is 32 or 64-bit by using the registry. I am aware
> of
> the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
> NT\CurrentVersion\CurrentVersion. Windows XP would be 5.1 and Vista would
> be
> 6.0. I noticed that both the 32 and 64 bit versions are set to version
> 6.0.
> Does anyone know where to find the bit version installed in the registry?
> System Information is able to tell so it must be in the registry
> somewhere.
>
> I have been searching the internet for awhile without much luck so far.
>
> --
>
> Thanks,
>
> Rob


 
Reply With Quote
 
RobM
Guest
Posts: n/a

 
      12-01-2008

I get an error message using this code:

Line 8
Char 5

Error: Object doesn't support this property or method:
'objOperatingSystem.OSArchitecture'

Will this script tell me the bit version of the OS installed or only if the
processor supports it? I'm looking for the bit version of the OS installed.

--

Thanks,

Rob


"Mark L. Ferguson" wrote:

> --OS Architecture.VBS--cut here--
> ' Mark L. Ferguson 2008
> ' script to detect 32 or 64 bit architecture
> strComputer = "."
> Set objWMIService = GetObject("winmgmts:" _
> & "{impersonationLevel=impersonate}!\\" _
> & strComputer & "\root\cimv2")
> Set colOperatingSystems = objWMIService.ExecQuery _
> ("Select * from Win32_OperatingSystem")
> For Each objOperatingSystem in colOperatingSystems
> Wscript.Echo objOperatingSystem.Caption & _
> " " & objOperatingSystem.OSArchitecture
> Next
> --end file--cut here--
>
> --
> Use the "Ratings" feature. It helps the new users.
> Please use the Communities guidelines when posting.
> http://www.microsoft.com/wn3/locales...help_en-us.htm
> Mark L. Ferguson MS-MVP
> https://mvp.support.microsoft.com/profile/Mark.Ferguson
>
> "RobM" <> wrote in message
> news:8A55D8EB-D956-4D0C-B978-...
> > Hi,
> >
> > I need to find out if there is a way to determine the operating system
> > version and whether it is 32 or 64-bit by using the registry. I am aware
> > of
> > the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
> > NT\CurrentVersion\CurrentVersion. Windows XP would be 5.1 and Vista would
> > be
> > 6.0. I noticed that both the 32 and 64 bit versions are set to version
> > 6.0.
> > Does anyone know where to find the bit version installed in the registry?
> > System Information is able to tell so it must be in the registry
> > somewhere.
> >
> > I have been searching the internet for awhile without much luck so far.
> >
> > --
> >
> > Thanks,
> >
> > Rob

>

 
Reply With Quote
 
PaulM
Guest
Posts: n/a

 
      12-01-2008
Go here line 14 and download the script and run it.
http://www.paulsxp.com/tweaksvista.html

--
Paul's XP and Vista Tweaks
---------------------------------------
www.paulsxp.com

Paul's XP and Vista Help Forum
--------------------------------------------
www.paulsxp.com/forum

Live Support
------------------
www.paulsxp.com/livesupport.html

"RobM" <> wrote in message
news:8A55D8EB-D956-4D0C-B978-...
> Hi,
>
> I need to find out if there is a way to determine the operating system
> version and whether it is 32 or 64-bit by using the registry. I am aware
> of
> the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
> NT\CurrentVersion\CurrentVersion. Windows XP would be 5.1 and Vista would
> be
> 6.0. I noticed that both the 32 and 64 bit versions are set to version
> 6.0.
> Does anyone know where to find the bit version installed in the registry?
> System Information is able to tell so it must be in the registry
> somewhere.
>
> I have been searching the internet for awhile without much luck so far.
>
> --
>
> Thanks,
>
> Rob


 
Reply With Quote
 
RobM
Guest
Posts: n/a

 
      12-01-2008
One last question. You are making the determination by using the key
HKLM\SYSTEM\CurrentControlSet\Control\Session
Manager\Environment\PROCESSOR_ARCHITECTURE. Doesn't this refer to the
processor's capability rather than the OS bit version?

If you install a 32-bit OS on a processor capable of supporting 64-bit, the
value at that key will still be x86 regardless of the processor?

Sorry to drag this on but the Processor_Architecture key makes this a little
confusing.
--

Thanks,

Rob


"PaulM" wrote:

> Go here line 14 and download the script and run it.
> http://www.paulsxp.com/tweaksvista.html
>
> --
> Paul's XP and Vista Tweaks
> ---------------------------------------
> www.paulsxp.com
>
> Paul's XP and Vista Help Forum
> --------------------------------------------
> www.paulsxp.com/forum
>
> Live Support
> ------------------
> www.paulsxp.com/livesupport.html
>
> "RobM" <> wrote in message
> news:8A55D8EB-D956-4D0C-B978-...
> > Hi,
> >
> > I need to find out if there is a way to determine the operating system
> > version and whether it is 32 or 64-bit by using the registry. I am aware
> > of
> > the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
> > NT\CurrentVersion\CurrentVersion. Windows XP would be 5.1 and Vista would
> > be
> > 6.0. I noticed that both the 32 and 64 bit versions are set to version
> > 6.0.
> > Does anyone know where to find the bit version installed in the registry?
> > System Information is able to tell so it must be in the registry
> > somewhere.
> >
> > I have been searching the internet for awhile without much luck so far.
> >
> > --
> >
> > Thanks,
> >
> > Rob

>
>

 
Reply With Quote
 
Darrell Gorter[MSFT]
Guest
Posts: n/a

 
      12-02-2008
Hello Rob,
The Processor_Architecture should show the OS platform
The Processor_Identifier shows the hardware of the chip that is installed.
Thanks,
Darrell Gorter[MSFT]

This posting is provided "AS IS" with no warranties, and confers no rights
--------------------
| >Thread-Topic: Determine OS version and bit type from the registry
| >thread-index: AclUB0k5OIqZoiexTuuBfRB/PxwOHQ==
| >From: =?Utf-8?B?Um9iTQ==?= <>
| >References: <8A55D8EB-D956-4D0C-B978->
<es5TZs#>
| >Subject: Re: Determine OS version and bit type from the registry
| >Date: Mon, 1 Dec 2008 14:51:02 -0800
| >Lines: 60
| >Message-ID: <7035BA8F-9CE0-4108-8D8B->
| >MIME-Version: 1.0
| >Content-Type: text/plain;
| > charset="Utf-8"
| >Content-Transfer-Encoding: 7bit
| >X-Newsreader: Microsoft CDO for Windows 2000
| >Content-Class: urn:content-classes:message
| >Importance: normal
| >Priority: normal
| >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.3168
| >Newsgroups: microsoft.public.windows.vista.general
| >Path: TK2MSFTNGHUB02.phx.gbl
| >Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.windows.vista.general:369078
| >NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
| >X-Tomcat-NG: microsoft.public.windows.vista.general
| >
| >One last question. You are making the determination by using the key
| >HKLM\SYSTEM\CurrentControlSet\Control\Session
| >Manager\Environment\PROCESSOR_ARCHITECTURE. Doesn't this refer to the
| >processor's capability rather than the OS bit version?
| >
| >If you install a 32-bit OS on a processor capable of supporting 64-bit,
the
| >value at that key will still be x86 regardless of the processor?
| >
| >Sorry to drag this on but the Processor_Architecture key makes this a
little
| >confusing.
| >--
| >
| > Thanks,
| >
| > Rob
| >
| >
| >"PaulM" wrote:
| >
| >> Go here line 14 and download the script and run it.
| >> http://www.paulsxp.com/tweaksvista.html
| >>
| >> --
| >> Paul's XP and Vista Tweaks
| >> ---------------------------------------
| >> www.paulsxp.com
| >>
| >> Paul's XP and Vista Help Forum
| >> --------------------------------------------
| >> www.paulsxp.com/forum
| >>
| >> Live Support
| >> ------------------
| >> www.paulsxp.com/livesupport.html
| >>
| >> "RobM" <> wrote in message
| >> news:8A55D8EB-D956-4D0C-B978-...
| >> > Hi,
| >> >
| >> > I need to find out if there is a way to determine the operating
system
| >> > version and whether it is 32 or 64-bit by using the registry. I am
aware
| >> > of
| >> > the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
| >> > NT\CurrentVersion\CurrentVersion. Windows XP would be 5.1 and Vista
would
| >> > be
| >> > 6.0. I noticed that both the 32 and 64 bit versions are set to
version
| >> > 6.0.
| >> > Does anyone know where to find the bit version installed in the
registry?
| >> > System Information is able to tell so it must be in the registry
| >> > somewhere.
| >> >
| >> > I have been searching the internet for awhile without much luck so
far.
| >> >
| >> > --
| >> >
| >> > Thanks,
| >> >
| >> > Rob
| >>
| >>
| >

 
Reply With Quote
 
RobM
Guest
Posts: n/a

 
      12-02-2008
Just for the record, I just found out that there is an environment variable
assigned for this purpose. If you use %Processor_Architecture%, that will
also get the information I was looking for. I could just as easily use this
for my purpose as looking in the registry.

--

Thanks,

Rob


"RobM" wrote:

> Ok, that answers all of my questions. Thank you to everyone that helped on
> this! It is very much appreciated!
>
> --
>
> Thanks,
>
> Rob
>
>
> ""Darrell Gorter[MSFT]"" wrote:
>
> > Hello Rob,
> > The Processor_Architecture should show the OS platform
> > The Processor_Identifier shows the hardware of the chip that is installed.
> > Thanks,
> > Darrell Gorter[MSFT]
> >
> > This posting is provided "AS IS" with no warranties, and confers no rights
> > --------------------
> > | >Thread-Topic: Determine OS version and bit type from the registry
> > | >thread-index: AclUB0k5OIqZoiexTuuBfRB/PxwOHQ==
> > | >From: =?Utf-8?B?Um9iTQ==?= <>
> > | >References: <8A55D8EB-D956-4D0C-B978->
> > <es5TZs#>
> > | >Subject: Re: Determine OS version and bit type from the registry
> > | >Date: Mon, 1 Dec 2008 14:51:02 -0800
> > | >Lines: 60
> > | >Message-ID: <7035BA8F-9CE0-4108-8D8B->
> > | >MIME-Version: 1.0
> > | >Content-Type: text/plain;
> > | > charset="Utf-8"
> > | >Content-Transfer-Encoding: 7bit
> > | >X-Newsreader: Microsoft CDO for Windows 2000
> > | >Content-Class: urn:content-classes:message
> > | >Importance: normal
> > | >Priority: normal
> > | >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.3168
> > | >Newsgroups: microsoft.public.windows.vista.general
> > | >Path: TK2MSFTNGHUB02.phx.gbl
> > | >Xref: TK2MSFTNGHUB02.phx.gbl
> > microsoft.public.windows.vista.general:369078
> > | >NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
> > | >X-Tomcat-NG: microsoft.public.windows.vista.general
> > | >
> > | >One last question. You are making the determination by using the key
> > | >HKLM\SYSTEM\CurrentControlSet\Control\Session
> > | >Manager\Environment\PROCESSOR_ARCHITECTURE. Doesn't this refer to the
> > | >processor's capability rather than the OS bit version?
> > | >
> > | >If you install a 32-bit OS on a processor capable of supporting 64-bit,
> > the
> > | >value at that key will still be x86 regardless of the processor?
> > | >
> > | >Sorry to drag this on but the Processor_Architecture key makes this a
> > little
> > | >confusing.
> > | >--
> > | >
> > | > Thanks,
> > | >
> > | > Rob
> > | >
> > | >
> > | >"PaulM" wrote:
> > | >
> > | >> Go here line 14 and download the script and run it.
> > | >> http://www.paulsxp.com/tweaksvista.html
> > | >>
> > | >> --
> > | >> Paul's XP and Vista Tweaks
> > | >> ---------------------------------------
> > | >> www.paulsxp.com
> > | >>
> > | >> Paul's XP and Vista Help Forum
> > | >> --------------------------------------------
> > | >> www.paulsxp.com/forum
> > | >>
> > | >> Live Support
> > | >> ------------------
> > | >> www.paulsxp.com/livesupport.html
> > | >>
> > | >> "RobM" <> wrote in message
> > | >> news:8A55D8EB-D956-4D0C-B978-...
> > | >> > Hi,
> > | >> >
> > | >> > I need to find out if there is a way to determine the operating
> > system
> > | >> > version and whether it is 32 or 64-bit by using the registry. I am
> > aware
> > | >> > of
> > | >> > the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
> > | >> > NT\CurrentVersion\CurrentVersion. Windows XP would be 5.1 and Vista
> > would
> > | >> > be
> > | >> > 6.0. I noticed that both the 32 and 64 bit versions are set to
> > version
> > | >> > 6.0.
> > | >> > Does anyone know where to find the bit version installed in the
> > registry?
> > | >> > System Information is able to tell so it must be in the registry
> > | >> > somewhere.
> > | >> >
> > | >> > I have been searching the internet for awhile without much luck so
> > far.
> > | >> >
> > | >> > --
> > | >> >
> > | >> > Thanks,
> > | >> >
> > | >> > Rob
> > | >>
> > | >>
> > | >
> >
> >

 
Reply With Quote
 
Darrell Gorter[MSFT]
Guest
Posts: n/a

 
      12-02-2008
Hello Rob,
Note about using the environment variable to be aware of.
This will change depending on whether you are running the 64-bit cmd prompt
or the wow64 (32-bit) cmd prompt.
If you run the 64-bit \windows\system32\CMD.exe you will get AMD64
If you run 32-bit \windows\syswow64\cmd.exe you will get x86.
Thanks,
Darrell Gorter[MSFT]

This posting is provided "AS IS" with no warranties, and confers no rights
--------------------
| >Thread-Topic: Determine OS version and bit type from the registry
| >thread-index: AclUyMO4SzsjBOBzTa+hfwscHn0L0A==
| >X-WBNR-Posting-Host: 207.46.19.197
| >From: =?Utf-8?B?Um9iTQ==?= <>
| >References: <8A55D8EB-D956-4D0C-B978->
<es5TZs#>
<7035BA8F-9CE0-4108-8D8B->
<>
<781C3CA6-1018-4A68-BB26->
| >Subject: Re: Determine OS version and bit type from the registry
| >Date: Tue, 2 Dec 2008 13:56:01 -0800
| >Lines: 130
| >Message-ID: <5C42FAB0-B86C-4447-B0A0->
| >MIME-Version: 1.0
| >Content-Type: text/plain;
| > charset="Utf-8"
| >Content-Transfer-Encoding: 7bit
| >X-Newsreader: Microsoft CDO for Windows 2000
| >Content-Class: urn:content-classes:message
| >Importance: normal
| >Priority: normal
| >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.3168
| >Newsgroups: microsoft.public.windows.vista.general
| >Path: TK2MSFTNGHUB02.phx.gbl
| >Xref: TK2MSFTNGHUB02.phx.gbl
microsoft.public.windows.vista.general:369304
| >NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
| >X-Tomcat-NG: microsoft.public.windows.vista.general
| >
| >Just for the record, I just found out that there is an environment
variable
| >assigned for this purpose. If you use %Processor_Architecture%, that
will
| >also get the information I was looking for. I could just as easily use
this
| >for my purpose as looking in the registry.
| >
| >--
| >
| > Thanks,
| >
| > Rob
| >
| >
| >"RobM" wrote:
| >
| >> Ok, that answers all of my questions. Thank you to everyone that
helped on
| >> this! It is very much appreciated!
| >>
| >> --
| >>
| >> Thanks,
| >>
| >> Rob
| >>
| >>
| >> ""Darrell Gorter[MSFT]"" wrote:
| >>
| >> > Hello Rob,
| >> > The Processor_Architecture should show the OS platform
| >> > The Processor_Identifier shows the hardware of the chip that is
installed.
| >> > Thanks,
| >> > Darrell Gorter[MSFT]
| >> >
| >> > This posting is provided "AS IS" with no warranties, and confers no
rights
| >> > --------------------
| >> > | >Thread-Topic: Determine OS version and bit type from the registry
| >> > | >thread-index: AclUB0k5OIqZoiexTuuBfRB/PxwOHQ==
| >> > | >From: =?Utf-8?B?Um9iTQ==?= <>
| >> > | >References: <8A55D8EB-D956-4D0C-B978->
| >> > <es5TZs#>
| >> > | >Subject: Re: Determine OS version and bit type from the registry
| >> > | >Date: Mon, 1 Dec 2008 14:51:02 -0800
| >> > | >Lines: 60
| >> > | >Message-ID: <7035BA8F-9CE0-4108-8D8B->
| >> > | >MIME-Version: 1.0
| >> > | >Content-Type: text/plain;
| >> > | > charset="Utf-8"
| >> > | >Content-Transfer-Encoding: 7bit
| >> > | >X-Newsreader: Microsoft CDO for Windows 2000
| >> > | >Content-Class: urn:content-classes:message
| >> > | >Importance: normal
| >> > | >Priority: normal
| >> > | >X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.3168
| >> > | >Newsgroups: microsoft.public.windows.vista.general
| >> > | >Path: TK2MSFTNGHUB02.phx.gbl
| >> > | >Xref: TK2MSFTNGHUB02.phx.gbl
| >> > microsoft.public.windows.vista.general:369078
| >> > | >NNTP-Posting-Host: tk2msftibfm01.phx.gbl 10.40.244.149
| >> > | >X-Tomcat-NG: microsoft.public.windows.vista.general
| >> > | >
| >> > | >One last question. You are making the determination by using the
key
| >> > | >HKLM\SYSTEM\CurrentControlSet\Control\Session
| >> > | >Manager\Environment\PROCESSOR_ARCHITECTURE. Doesn't this refer to
the
| >> > | >processor's capability rather than the OS bit version?
| >> > | >
| >> > | >If you install a 32-bit OS on a processor capable of supporting
64-bit,
| >> > the
| >> > | >value at that key will still be x86 regardless of the processor?
| >> > | >
| >> > | >Sorry to drag this on but the Processor_Architecture key makes
this a
| >> > little
| >> > | >confusing.
| >> > | >--
| >> > | >
| >> > | > Thanks,
| >> > | >
| >> > | > Rob
| >> > | >
| >> > | >
| >> > | >"PaulM" wrote:
| >> > | >
| >> > | >> Go here line 14 and download the script and run it.
| >> > | >> http://www.paulsxp.com/tweaksvista.html
| >> > | >>
| >> > | >> --
| >> > | >> Paul's XP and Vista Tweaks
| >> > | >> ---------------------------------------
| >> > | >> www.paulsxp.com
| >> > | >>
| >> > | >> Paul's XP and Vista Help Forum
| >> > | >> --------------------------------------------
| >> > | >> www.paulsxp.com/forum
| >> > | >>
| >> > | >> Live Support
| >> > | >> ------------------
| >> > | >> www.paulsxp.com/livesupport.html
| >> > | >>
| >> > | >> "RobM" <> wrote in message
| >> > | >> news:8A55D8EB-D956-4D0C-B978-...
| >> > | >> > Hi,
| >> > | >> >
| >> > | >> > I need to find out if there is a way to determine the
operating
| >> > system
| >> > | >> > version and whether it is 32 or 64-bit by using the registry.
I am
| >> > aware
| >> > | >> > of
| >> > | >> > the registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows
| >> > | >> > NT\CurrentVersion\CurrentVersion. Windows XP would be 5.1 and
Vista
| >> > would
| >> > | >> > be
| >> > | >> > 6.0. I noticed that both the 32 and 64 bit versions are set
to
| >> > version
| >> > | >> > 6.0.
| >> > | >> > Does anyone know where to find the bit version installed in
the
| >> > registry?
| >> > | >> > System Information is able to tell so it must be in the
registry
| >> > | >> > somewhere.
| >> > | >> >
| >> > | >> > I have been searching the internet for awhile without much
luck so
| >> > far.
| >> > | >> >
| >> > | >> > --
| >> > | >> >
| >> > | >> > Thanks,
| >> > | >> >
| >> > | >> > Rob
| >> > | >>
| >> > | >>
| >> > | >
| >> >
| >> >
| >

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I determine if an install version is 32bit or 64 bit? Timmer Windows Vista Installation 6 02-07-2009 03:58 AM
Download Windows Vista SP2 Pre-Beta Version by Registry Hack Benny Windows Vista Installation 5 10-27-2008 09:58 AM
Setup cannot determine if this computer supports this version of W DannyBoy Windows Vista Installation 2 10-05-2006 11:56 PM
"Windows Setup cannot determine if this computer supports installing this version of Windows." M. Trussell Windows Vista General Discussion 5 09-11-2006 06:26 AM
Registry Cleaner type programs? Tim D Windows Vista Performance 1 06-13-2006 11:30 AM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59