1

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.

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992
kingtermite
  • 55
  • 2
  • 9

1 Answers1

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?

Martin Prikryl
  • 188,800
  • 56
  • 490
  • 992