NSIS 在静默模式下查找文件不起作用
我有以下函数来递归搜索 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
当我正常运行安装程序时,它会按预期工作并在关联文件夹中找到所有 dll 文件。
但是,它在静默模式下找不到这些文件,即使我可以导航到它正在搜索的目录并查看文件是否在那里。我在安装过程中已经请求了管理员权限,并且管理员对该文件夹中的dll文件拥有完全权限。
任何想法为什么它可能找不到文件?
I have the following function to recursively search for dll files.
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.
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.
Any ideas why it may not be finding the files?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
调用nxs插件创建banner时,需要使用/end参数。
When calling the nxs plugin to create a banner, needed to use /end parameter.