如何使用 NSIS 脚本检测 Windows 32 位或 64 位? [英] How to detect windows 32bit or 64 bit using NSIS script?
本文介绍了如何使用 NSIS 脚本检测 Windows 32 位或 64 位?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经为 java 项目编写了 nsis 脚本.我的项目中有批处理文件.我已经为常见的 Windows 32 位和 64 位编写了批处理文件.安装后我已经使用 Exec 自动启动了批处理文件命令.它在 32 位 Windows 中工作正常.但同时这在 64 位中效果不佳.所以我怀疑在安装之前我应该检查 Windows 是 32 位还是 64 位版本.请分享您的看法如何检查?
I have written nsis script for java project.I have Batch file in my project.I have written batch file for commonly windows 32bit and 64 bit.After installing i have started batch file automatically using Exec command.Its woks fine in 32bit windows.but the same time this is not worked well in 64 bit.so i suspect that before installing i should check whether windows is 32 bit or 64 bit version.please share your views how to check?
推荐答案
使用 x64.nsh 标头:
!include LogicLib.nsh
!include x64.nsh
Section
${If} ${RunningX64}
DetailPrint "64-bit Windows"
${Else}
DetailPrint "32-bit Windows"
${EndIf}
SectionEnd
这篇关于如何使用 NSIS 脚本检测 Windows 32 位或 64 位?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文