You are here

Write default data with environment substitutions?

2 posts / 0 new
Last post
Last seen: 3 years 1 month ago
Joined: 2020-02-17 06:20
Write default data with environment substitutions?

I need to write this XML file on first launch and every launch after:

This doesn't work first launch, as defaultdata doesn't use environment substitutions.

Whats the best way to do this? Just remove all the root URLs and home path then write in the launcher?
Im going to have to write with the launcher anyway to update paths at startup.


Ken Herbert
Ken Herbert's picture
Last seen: 59 min 53 sec ago
Joined: 2010-05-25 18:19
Use the launcher.ini for your substitutions

What you need to do is set an identifiably unique string in the default data file(s), then create replace rules in your launcher.ini for each of those strings.

As an example this is what I did for LAN Messenger Portable...

In the default data:

In the launcher.ini:
File=%PAL:DataDir%\Roaming\LAN Messenger.ini
Replace=%PAL:DataDir:DoubleBackslash%\\Received Files

Log in or register to post comments