简体   繁体   English

NSIS在静默模式下查找文件不起作用

[英]NSIS Find files in silent mode not working

I have the following function to recursively search for dll files. 我具有以下功能来递归搜索dll文件。

Function ProcessDLLFiles
Exch $0
Push $1
Push $2
FindFirst $1 $2 "$INSTDIR\*.dll"
loop:
    IfErrors end
    DetailPrint 'Found "$0\$2"'
    FindNext $1 $2
    goto loop
end:
FindClose $1
FindFirst $1 $2 "$0\*.*"
dirloop:
    IfErrors dirend 
    IfFileExists "$0\$2\*.*" 0 dirnext
    StrCmp $2 "." dirnext
    StrCmp $2 ".." dirnext
    Push "$0\$2"
    call ${__FUNCTION__}
dirnext:
    FindNext $1 $2
    goto dirloop
dirend:
    FindClose $1
Pop $2
Pop $1
Pop $0
FunctionEnd

When I run the installer normally, it works as expected and finds all dll files in the associated folder. 当我正常运行安装程序时,它会按预期运行,并在关联的文件夹中找到所有dll文件。

However, it does not find these files in silent mode, even though I can navigate to the directory it is searching in and see that the files are there. 但是,即使我可以导航到它正在搜索的目录并看到文件在那里,它也不会以静默方式找到这些文件。 I already request admin privileges during installation, and Administrators have full permissions on the dll files in the folder. 我已经在安装过程中请求了管理员特权,并且管理员对文件夹中dll文件具有完全权限。

Any ideas why it may not be finding the files? 有什么想法为什么找不到文件?

调用nxs插件创建横幅时,需要使用/ end参数。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM