Nsis 我的密码有什么问题?

Nsis 我的密码有什么问题?,nsis,Nsis,函数提取zip #Var directoryexe# ;Declare the variable ###Section directory### StrCpy $DIRECTORYEXE "$EXEDIR" ###SectionEnd### **Section "ZIP" locatezip** ClearErrors ${Locate} "$DIRECTORYEXE" "/L=F /M=something.zip /S=1K" "ExtractZip" ; '

函数提取zip

#Var directoryexe# ;Declare the variable

###Section directory###
    StrCpy $DIRECTORYEXE "$EXEDIR"
###SectionEnd###

**Section "ZIP" locatezip**

ClearErrors

    ${Locate} "$DIRECTORYEXE" "/L=F /M=something.zip /S=1K" "ExtractZip"

    ; '.zip' file next to .exe with size 1 Kb or more

    IfErrors 0 noerror

    MessageBox MB_OK "ERRROR" IDOK +3

noerror:

MessageBox MB_OK "$$R0=$R0" 

**SectionEnd**
FunctionEnd


如果zip在exedir中,则提取它,但当它不在那里时,则不写入错误消息,这是什么问题S

在您的特定情况下,当Zipdell::extractall找不到.zip时,您可能会使用从Zipdl::extractall获得的错误消息


${Locate}
无法知道找不到文件是否是错误。你必须自己跟踪这件事。如果您的回调函数(ExtractZip)从未被调用,则该文件未被找到…

这与您已经提出的问题有何不同?您不能仅仅假设iErrors可以工作,您必须阅读您正在使用的功能的文档。在这种情况下,检查Zipdl::extractall中的错误就足够了。。。
    strcpy "$R0" "$R9"

    ZipDLL::extractall "$R0" "$PROGRAMFILES\Example"

    Pop $0

    MessageBox MB_OK "$$0=$0"

    StrCpy $0 StopLocate

    Push $0