Detecting 32bit or 64bit OS in VBscript

As part of the process of updating some machines to 64bit this week, I realized that I’ll have to adjust existing code to automate updates and service packs on the affected machines. I wrote previously about a similar function in lisp here.

Here is the Filagra on the other hand is a new pill which is completely safe and offers a highly satisfying sexual cheap cialis brand experience. Pauciarticular juvenile rheumatoid arthritis or oligoarthritis catches cialis 40 mg amerikabulteni.com 4 or less than 4 joints and is caused rather in girls than in boys. Additionally, do whatever it takes not to go excessively long between solutions, as order generic levitra Propecia must be taken regularly in order to get/maintain benefits, you should make sure to purchase Propecia ahead of time. This enzyme makes a contribution in store viagra in promoting cGMP enzyme in your bloodstream. VBScript version:

On Error Resume Next

Dim WshShell
Dim OsType

Set WshShell = CreateObject(“WScript.Shell”)

OsType = WshShell.RegRead(“HKLMSYSTEMCurrentControlSetControlSession ManagerEnvironmentPROCESSOR_ARCHITECTURE”)

If OsType = “x86” then
wscript.echo “Windows 32bit system detected”
elseif OsType = “AMD64” then
wscript.echo “Windows 64bit system detected”
end if

3 thoughts on “Detecting 32bit or 64bit OS in VBscript

  • June 22, 2011 at 19:37
    Permalink

    I checked the reg keys on an x64 CPU with an x64 O/S (Windows 7, x64), key = AMD64. I also checked the reg keys for an x64 CPU with an x86 O/S (XP, 32 bit) = x86

Leave a Reply