yuval
yuval

Reputation: 3088

Inno Setup: How to put the installer itself in the installed program

I have an installer on Inno Setup that installs a program.
This installer has many forms for user input.
But if the user didn't type in the appropriate information, I would like to give him the option to reclick the installer and type in the appropriate information.
I tried to achive this like so:

[Files]
Source: "C:\Users\myUser\Output\Setup.exe"; DestDir: "{app}";

But I get this following error when i run the code: (Source file "C:\Users\myUser\Output\Setup.exe" does not exist.)
So how can I put the installer itself in the installation?

Upvotes: 3

Views: 1388

Answers (2)

STEVE belleinguer
STEVE belleinguer

Reputation: 1

You could also use the AppmodifiPath feature in [setup] section to add a 'modify' option in Windows Control panel 'Programs and feature' this way your user will be able to relaunch the setup and modify the path. Look below

[Setup] AppModifyPath="{app}\mySetup.exe" /modify=1

[Files] Source: "{srcexe}"; DestDir: "{app}"; Flags: external

Upvotes: 0

TLama
TLama

Reputation: 76733

I think this might do what you want. It copies the setup binary file referred by the {srcexe} constant to the application directory given by the {app} constant and does it externally by the external flag, so the setup package doesn't need to packed inside itself. In other words, it just copies the executed setup to the application folder:

[Files]
Source: "{srcexe}"; DestDir: "{app}"; Flags: external

Upvotes: 6

Related Questions