How do i detect the bitness (32-bit vs. 64-bit) of the Windows OS in VBScript?
I tried this approach but it doesn\'t work; I guess the (x86) is causing some problem
You can also check if folder C:\Windows\sysnative
exist. This folder (or better alias) exist only in 32-Bit process, see File System Redirector
Set fso = CreateObject("Scripting.FileSystemObject")
Set wshShell = CreateObject( "WScript.Shell" )
If fso.FolderExists(wshShell.ExpandEnvironmentStrings("%windir%") & "\sysnative" ) Then
WScript.Echo "You are running in 32-Bit Mode"
Else
WScript.Echo "You are running in 64-Bit Mode"
End if
Note: this script shows whether your current process is running in 32-bit or 64-bit mode - it does not show the architecture of your Windows.