Installer with supplying parameter

35 views
Skip to first unread message

Frederic Luc

unread,
May 31, 2021, 5:29:26 AMMay 31
to innosetup
Hi,

I have created an installer with InnoSetup but 3 values can be different on which machine i launch my installer. For exemple the name of the server, the name of the share (exactly 4 information can move).

I have try to do this with an include
include "MyInit_File.iss"

But the Installer will not read in this file every time i change and excute my exe file.

Do you have an idea how to do this ?

Thanks forward

Best regards

Jernej Simončič

unread,
May 31, 2021, 8:49:24 AMMay 31
to Frederic Luc on [innosetup]
On Monday, May 31, 2021, 11:29:26, Frederic Luc wrote:

> include "MyInit_File.iss"

> But the Installer will not read in this file every time i change and excute
> my exe file.

Include works at compile time, not run-time. If you need to do configuration at setup runtime, you will have to write some [Code] to do it.

--
< Jernej Simončič ><><><><>< https://eternallybored.org/ >

If nobody uses it, there's a reason.
-- Rule of Reason

Frederic Luc

unread,
May 31, 2021, 9:56:23 AMMay 31
to innosetup
Ok, thanks for your reply.

you will have to write some [Code] to do it. --> what you think, i must create a file that contain the wished values (name of server, name of share), and for the [code] part, i must open the file and search this value ?

Best regards

Frederic Luc

unread,
May 31, 2021, 12:10:50 PMMay 31
to innosetup
Hello, finally found a solution with GetIniString

best regards

Le Monday, May 31, 2021 à 2:49:24 PM UTC+2, Jernej Simončič a écrit :

Frederic Luc

unread,
May 31, 2021, 1:29:39 PMMay 31
to innosetup
I can also read the value in my personal ini file, and from the procedure CurStepChanged my variable have been well informed, but how then can i use this variable for example in InitializeSetup, Run, Registry and Files sections ?

how i define Sourcedir with the value contain in my inifile ?

Thanks forward
Reply all
Reply to author
Forward
0 new messages