Why %processor_architecture% always returns x86 instead of AMD64

后端 未结 9 2317
被撕碎了的回忆
被撕碎了的回忆 2020-11-29 03:03

I am trying to retrieve the environment variable to detect whether the system is 32 or 64 bit. But on 64 bit server the environment variable %processor_architecture%

9条回答
  •  囚心锁ツ
    2020-11-29 03:38

    I found on my Win7HB x64 system:

    msgbox wscript.createobject("wscript.shell").environment("system").item("processor_architecture") ' always "AMD64"
    
    msgbox wscript.createobject("wscript.shell").environment("process").item("processor_architecture") ' "AMD64" if launched via System32, "x86" if launched via SysWOW64
    

提交回复
热议问题