我正在尝试做一个安装程序,做了几个检查,在初始化的安装程序,如检查您的windows是64/32位。如果嵌入式安装程序在EXEDIR中。这是一段代码。
${If} ${RunningX32}
MessageBox MB_OK "running on x32"
${AndIf} ${FileExists} "$EXEDIR\VDF2012-17.0.22.8.Client.exe" #32 bit version
!insertmacro UnselectSection ${SEC02}
SectionSetText ${SEC02} ""
!insertmacro SelectSection ${SEC03}
${Else}
!insertmacro UnselectSection ${SEC03}
SectionSetText ${SEC03} ""
MessageBox MB_OKCANCEL "${PRODUCT_NAME} misses the Visual DataFlex setup. \
Do you wan't to download it?" IDOK true IDCANCEL false
true:
StrCpy $2 "$EXEDIR\VDF2012-17.0.22.8.Client.exe"
inetc::get /caption "Downloading Visual DataFlex" /popup "" "ftp://ftp.dataaccess.com/pub/products/vdf/Software/VDF2012-17.0.22.8.Client.exe" "$EXEDIR\VDF2012-17.0.22.8.Client.exe" $2
Pop $R0 ;Get the return value
StrCmp $R0 "success" +3
ExecWait $2
Delete $2
false:
${EndIf}但是在第一行,代码已经给了我这个错误,我尝试了所有的方法来修复它。
!insertmacro: _If
!insertmacro: macro "_If" requires 4 parameter (s), passed 2!
Error in script "Path" Aborting blabla...我希望我说得很清楚了。
发布于 2012-09-18 20:26:56
没有名为RunningX32的宏,您需要使用RunningX64宏:
!include x64.nsh
...
${IfNot} ${RunningX64}
...https://stackoverflow.com/questions/12473879
复制相似问题