最新消息:

判断X86,X64,IA64操作系统

nsis 永恒心锁 1630浏览 0评论
SetCompressor /SOLID lzma
XPStyle on
!include WinVer.nsh
OutFile "判断X86,X64,IA64操作系统.EXE"
Name "判断X86,X64,IA64操作系统"
Section
${If} ${AtLeastWinXP}
System::Alloc 36
pop $0
${If} $0 <> 0
System::Call 'kernel32::GetNativeSystemInfo(i $0)'
System::Call "*$0(&i2.r1)"
System::Free $0
;输出值:$1=0:x86|6:ia64|9:x64|0xffff:unknown
StrCmp $1 0 +1 +2
StrCpy $R0 "x86"
StrCmp $1 6 +1 +2
StrCpy $R0 "ia64"
StrCmp $1 9 +1 +2
StrCpy $R0 "x64"
IntCmp $1 10 +1 +2 +1
StrCpy $R0 "unknown"
${EndIf}
MessageBox MB_ICONINFORMATION|MB_OK '系统是$R0架构'
${EndIf}
SectionEnd
永恒心锁,版权所有丨如未注明,均为转载丨本网站采用BY-NC-SA协议进行授权

转载请注明:永恒心锁-分享互联网 » 判断X86,X64,IA64操作系统

您必须 登录 才能发表评论!