View Single Post
  #9  
Old 08-02-2024, 18:50
K4miKaZe's Avatar
K4miKaZe K4miKaZe is offline
Registered User
 
Join Date: Sep 2018
Location: Spain
Posts: 146
Thanks: 177
Thanked 235 Times in 84 Posts
K4miKaZe is on a distinguished road
So i might have found a long standing bug (or maybe im just too dumb to make it work xD). It's about the [CustomIniFile] section. To make it simple, i've used a copy paste from the CIU Documentation to test it out and the Value entry never got applied to the .ini file, it always put into Value the path and .ini name instead.

Setup.ini:
Code:
{app}\IniFile3.ini; Section: Settings; Key: Language; Create: 1; Value: EN=english|ES=Spanish|FR=French|DE=German
After installation the IniFile3.ini is created, the section also is created inside the .ini and the Key also works too. But the Value returns the path instead of the value.

IniFile3.ini created by CIU after install:
Code:
[Settings]
Language={app}\IniFile3.ini
I've tried out a few diff ways on the .ini but none worked, so i took a look into the .iss file and found this:

Code:
          begin
            if FileExists(IniName) or (StrToIntDef(LineDecode(TmpStr, 'Create', '0'), 0) = 1) then
            begin
              IniValue := LineDecode(TmpStr, '', '');
And changed it to this:

Code:
IniValue := LineDecode(TmpStr, 'Value', '');
On the setup.ini now its working fine, just needs to remove the spacing between Value: and the value, like this:

Code:
{app}\IniFile3.ini; Section: Settings; Key: Language; Create: 1; Value:EN=english|ES=Spanish|FR=French|DE=German
Not sure if this was intended on the .iss and i'm just using a wrong string on the setup.ini. I just leave it here if you want to take a look into it.

Regards !!!
Reply With Quote
The Following User Says Thank You to K4miKaZe For This Useful Post:
Cesar82 (09-02-2024)