Detecting 32bit or 64bit OS in VBscript

http://besidethecursor.integr-8.com/2010/03/detecting-32bit-or-64bit-os-in-vbscript.html

On Error Resume Next

Dim WshShell
Dim OsType

Set WshShell = CreateObject(“WScript.Shell”)

OsType = WshShell.RegRead(“HKLM\SYSTEM\CurrentControlSet\Control\Session Manager\Environment\PROCESSOR_ARCHITECTURE”)

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

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s