You are here

INI file without section

4 posts / 0 new
Last post
xmha97
Offline
Last seen: 7 months 2 weeks ago
Joined: 2021-01-03 06:04
INI file without section

I want to create a PortableApps.com version of the RetroArch
RetroArch settings are saved on RetroArch.cfg
RetroArch.cfg is an INI file without section, for example:

```
accessibility_enable = "false"
accessibility_narrator_speech_speed = "5"
ai_service_enable = "false"
ai_service_mode = "1"
ai_service_pause = "false"
ai_service_source_lang = "0"
ai_service_target_lang = "0"
```

How do I set a value on an INI file which does not have any section?

If I set the "Section" equal to nothing, the problem is still not solved:

```
[FileWrite1]
Type=INI
File=%PAL:DataDir%\settings\RetroArch.cfg
Section=
Key=recording_config_directory
Value=%PAL:DataDir%\Recordings
```

```
accessibility_enable = "false"
accessibility_narrator_speech_speed = "5"
ai_service_enable = "false"
ai_service_mode = "1"
ai_service_pause = "false"
ai_service_source_lang = "0"
ai_service_target_lang = "0"
[]
recording_config_directory=X:\Test\Test
```

xmha97
Offline
Last seen: 7 months 2 weeks ago
Joined: 2021-01-03 06:04
A Temporary solution

[FileWrite1]
Type=Replace
File=%PAL:DataDir%\settings\RetroArch.cfg
Find="accessibility_enable = "false""                   ; First line of RetroArch.cfg
Replace=[RetroArch]

[FileWrite2]
Type=INI
File=%PAL:DataDir%\settings\RetroArch.cfg
Section=RetroArch
Key=cache_directory
Value=%PAL:DataDir%\Cache

It working now but it's unstable.
Please help me to find a permanent solution.

John T. Haller
John T. Haller's picture
Offline
Last seen: 9 hours 19 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
ConfigWrite

If it doesn't have sections, it's not an INI, it's a config file: https://portableapps.com/manuals/PortableApps.comLauncher/ref/launcher.i...

Sometimes, the impossible can become possible, if you're awesome!

xmha97
Offline
Last seen: 7 months 2 weeks ago
Joined: 2021-01-03 06:04
Reply

Thanks, it works fine.

[FileWrite1]
Type=ConfigWrite
File="%PAL:DataDir%\settings\RetroArch.cfg"
Entry="cache_directory = "
Value=""%PAL:DataDir%\Temp""

Log in or register to post comments