Re: How to find the operating system bit (x86/x64/ia64)
- From: "Alex K. Angelopoulos" <aka(at)mvps.org>
- Date: Sun, 26 Apr 2009 07:32:11 -0400
Reading back, I realize there was one point that I may not have made explicit: the values represent an OS architecture, not necessarily a specific manufacturer. So if your system is running a non-Itanium Intel x64 chip - which uses the AMD64 architecture - the 64-bit Windows will return AMD64 for PROCESSOR_ARCHITECTURE. As another and very far-fetched example: suppose a mysterious Eastern European company comes up with a reverse-engineered Itanium-compatible design tomorrow and markets it as the SkopjeCPU. Since it looks and acts like an Itanium, the only versions of Windows that will install on systems with the SkopjeCPU will be builds compiled as IA64; and if you check PROCESSOR_ARCHITECTURE on a SkopjeCPU machine, it will come back as IA64.
"Alex K. Angelopoulos" <aka(at)mvps.org> wrote in message news:#agRVshxJHA.4776@xxxxxxxxxxxxxxxxxxxxxxx
Kiran,.
It turns out that you already have the answer with the script Paul showed if you just check the value he points to rather than using the post-processing via MsgBox.
The PROCESSOR_ARCHITECTURE value contains a string describing how _Windows_ perceives the CPU. if it's AMD64 cpu, you get AMD64. If it's IA64 the value is IA64. If it's an x86 CPU, OR if you are running 32-bit Windows directly on an AMD64, you get back x86.
Since you can access the machine key of the registry remotely using WMI, this is a good test for determining the OS architecture on a network of machines as well.
"kp" <kiran.r.pillai@xxxxxxxxx> wrote in message news:e8c522e5-6846-4923-b1c5-001cafe82a5e@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxOn Apr 24, 9:34 pm, "PaulM" <N...@xxxxxxxx> wrote:Here is one:
'32 or 64 bit
On Error Resume Next
Set WshShell = WScript.CreateObject("WScript.Shell")
sMsg = "This script will Display if you are running Windows 32 or 64 bit." &
vbCr _
& "It will also Display the date and time the OS was installed and the OS
version." & vbCr & vbCr _
& "Would you like to continue?"
sInput = MsgBox(sMsg, vbYesNo + vbInformation, "Paul's XP and Vista Tweaks")
If sInput = vbYes Then
X = WshShell.RegRead("HKLM\SYSTEM\CurrentControlSet\Control\Session
Manager\Environment\PROCESSOR_ARCHITECTURE")
If X = "x86" Then
MsgBox "You Are Running Windows 32-bit!" & vbCr & "This script was
downloaded fromwww.paulsxp.com", 64, "Windows 32-bit or 64-bit"
Else
MsgBox "You Are Running Windows XP 64-bit" & vbCr & "This script was
downloaded fromwww.paulsxp.com", 64, "Good for You!"
End If
For Each pm in GetObject("winmgmts:{impersonationLevel=impersonate}")._
ExecQuery("Select CurrentTimeZone, InstallDate From
Win32_OperatingSystem")
With CreateObject("WbemScripting.SWbemDateTime")
.Value = pm.InstallDate
MsgBox "Windows Installed: " & DateAdd("n", -pm.CurrentTimeZone,
.GetVarDate) & vbCr &_
"This script was downloaded fromwww.paulsxp.com" ,64, "XP Installed"
WshShell.Run("winver.exe")
End With
Next
End If
"kp" <kiran.r.pil...@xxxxxxxxx> wrote in message
news:4a48ec64-d26d-487b-9bfd-b89f746da786@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> On Apr 24, 5:38 pm, dinesh <gu...@xxxxxxxxxxxxxxxxx> wrote:
>> Type *winver *in the run box. OR simply hold the windows logo
>> key+pause/break key.
>> --
>> dinesh
>> Dinesh is a glorious beacon of light - Says Google.
> Hi Dinesh,
> If you observe my question is how to find out the bit-ness through a
> vb script. I was already aware of the "winver" command. But, I guess I
> won't be able to run winver through a vb script and parse the output.
> Let me know if my understanding is incorrect here.
> Regards,
> Kiran
Hi PaulM,
Thanks for your script.
However, I need further granularity in case a 64 bit operating system
is detected. I need to differentiate if it is as x64 or an ia64
operating system type.
Is that possible with some additions to your script?
Thanks,
kp
- References:
- How to find the operating system bit (x86/x64/ia64)
- From: kp
- Re: How to find the operating system bit (x86/x64/ia64)
- From: dinesh
- Re: How to find the operating system bit (x86/x64/ia64)
- From: kp
- Re: How to find the operating system bit (x86/x64/ia64)
- From: kp
- Re: How to find the operating system bit (x86/x64/ia64)
- From: Alex K. Angelopoulos
- How to find the operating system bit (x86/x64/ia64)
- Prev by Date: Thank you Jon, Paul and mayayana
- Next by Date: Re: Finding a File by the Extension.
- Previous by thread: Re: How to find the operating system bit (x86/x64/ia64)
- Next by thread: Re: How to find the operating system bit (x86/x64/ia64)
- Index(es):
Relevant Pages
|