我可以创建从网络上的 UNC 路径复制文件的安装程序吗? [英] Can I create installer that copies files from a UNC path on the network?

查看:18
本文介绍了我可以创建从网络上的 UNC 路径复制文件的安装程序吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以创建 Inno Setup 脚本来从网络上的 UNC 路径复制文件,而不是将它们静态添加到设置文件中?

Is it possible to create the Inno Setup script to copy files from a UNC path on the network rather than statically adding them to the setup file?

如果是这样,如果我需要先对路径进行身份验证,还可以吗?是否有在 Inno Setup 脚本中提供身份验证信息的机制?

If so, can it still be done if I need to authenticate to the path first? Is there a mechanism to provide authentication info in the Inno Setup script?

本质上,我希望安装程序仅通过内部网从 UNC 路径复制来自各种来源的文件,以放入安装程序目标目录.

Essentially, I am wanting setup to just copy files from various sources over the intranet from a UNC path to put into the setup destination directory.

推荐答案

可以,在[Files] 部分 条目并使用 external flag.

Yes, specify the UNC path in the Source parameter of the [Files] section entry and use the external flag.

[Files]
Source: \UNCpathfile.txt; DestDir: {app}; Flags: external

<小时>

要进行身份验证,您必须调用 WNetUseConnection 或类似的 WinAPI.


To authenticate, you would have to call the WNetUseConnection or similar WinAPI.

参见如何执行net use"来自 Windows 7 上的 Inno Setup 安装程序的命令?

这篇关于我可以创建从网络上的 UNC 路径复制文件的安装程序吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆