[英]Detecting windows 32bit or 64 bit using NSIS
I'm trying to determine which arquitecture has the OS. 我正在尝试确定哪个arquitecture具有操作系统。 I'm using this code:
我正在使用此代码:
!include x64.nsh
${If} ${RunningX64}
# 64 bit code
${Else}
# 32 bit code
${EndIf}
But always enters to #32 bit code in spite of I'm executing it on W7 x64 OS. 但是尽管我在W7 x64 OS上执行它,但总是输入#32位代码。
Try running this: 尝试运行此:
DetailPrint "NSIS=${NSIS_VERSION}"
System::Call 'kernel32::GetCurrentProcess()i.r0'
DetailPrint "GetCurrentProcess=$0"
System::Call 'kernel32::IsWow64Process(ir0,*i.r1)i.r2?e'
pop $3
DetailPrint "IsWow64Process: ret=$2 gle=$3 result=$1"
On my Win8 x64 OS this gives me: 在我的Win8 x64 OS上,这给了我:
NSIS=v2.46
GetCurrentProcess=-1
IsWow64Process: ret=1 gle=80 result=1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.