Hi there,
Riddle me this:
I have a piece of code that pulls the environment variable PROCESSOR_ARCHITECTURE. The system is (Windows 7) 64-bit but my code thinks it is a 32-bit system. What gives??
The code in VBScript:
Returns: x86.
From a command prompt, if I run:
Returns: AMD64
If I look in Windows environment variables, I see AMD64.
The only thing I can think of is the OS is running as a VM on ESX 3.5. I have tried the code on a 64-bit physical machine and it returns AMD64.
Before I go off to VMWare forums, I was wondering if anyone here may have seen similar behaviour before. It is only the VBScript code that lies.
Maybe I can find a WMI query to do the same thing.
Any ideas / help would be greatly apreciated.
Many thanks
Riddle me this:
I have a piece of code that pulls the environment variable PROCESSOR_ARCHITECTURE. The system is (Windows 7) 64-bit but my code thinks it is a 32-bit system. What gives??
The code in VBScript:
Code:
Set wshShell = CreateObject("WScript.Shell")
strProcessorArchitecture = wshShell.ExpandEnvironmentStrings("%PROCESSOR_ARCHITECTURE%")
wscript.echo strProcessorArchitecture
Returns: x86.
From a command prompt, if I run:
Code:
echo %PROCESSOR_ARCHITECTURE%
If I look in Windows environment variables, I see AMD64.
The only thing I can think of is the OS is running as a VM on ESX 3.5. I have tried the code on a 64-bit physical machine and it returns AMD64.
Before I go off to VMWare forums, I was wondering if anyone here may have seen similar behaviour before. It is only the VBScript code that lies.
Maybe I can find a WMI query to do the same thing.
Any ideas / help would be greatly apreciated.
Many thanks