Can I create installer that copies files from a UNC path on the network?

不羁岁月 提交于 2020-01-21 10:09:20

问题


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?

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?

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.


回答1:


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

[Files]
Source: \\UNC\path\file.txt; DestDir: {app}; Flags: external

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

See How to execute "net use" command from Inno Setup installer on Windows 7?



来源:https://stackoverflow.com/questions/42565324/can-i-create-installer-that-copies-files-from-a-unc-path-on-the-network

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!