I'm using Inno Setup's download system, but I would like to change the download folder from {tmp}
to another one, can someone help me?
of:
DownloadPage.Add('{#LinkJava}', ExpandConstant('{tmp}\Java.exe'), '');
for:
DownloadPage.Add('{#LinkJava}', ExpandConstant('{src}{#PastaGeralDeApps}{#PastaDownPlugins}{#NomeExeJava}'), '');
I'm creating an automatic installer and I need to store the apps in a folder, to use offline.
You cannot change the folder, where the files are downloaded to using
TDownloadWizardPage
(note that theBaseName
argument ofTDownloadWizardPage.Add
accepts a filename only, not a path).But you can copy over the files to the final folder, once they are downloaded.
You of course need to download the files before the actual installation. So for example from
NextButtonClick(wpReady)
, the way the officialCodeDownloadFiles.iss
example does.If you need to move the files to the final location before the installation, use
RenameFile
orFileCopy
functions. The copying is obviously slower, but more reliable, as you cannot move/rename between disks/filesystems. You might try moving, falling back to copying, if moving fails.