1

I've been trying to copy the installer generated by Inno Setup, to the install directory, on run of the installer. It seems the file is locked, because my FileCopy command results in nothing. I tried a message box (in the same code area) with the paths from and to, and both are valid correct paths, but the installer does not get copied.

Here's the line copying {srcexe} (installer path) to {app}\OriginalInstaller.exe (application install path), which does nothing for me.

    FileCopy(ExpandConstant('{srcexe}'), ExpandConstant('{app}\OriginalInstaller.exe'), False);

I and am new to Inno Setup, and I read on a related post that it's simply impossible to do - but, no justification was given for that. If you know why it's impossible to do, that would be great knowledge. Otherwise, I'd love to get the installer being copied to the install location.

The goal of this, is so I can rerun the installer if files are corrupt. I have a launcher program checking hashes of executables on launch, and if they are not correct, it is to rerun the installer.

Thanks in advance for any help!

FooBar
  • 51
  • 4

0 Answers0