I need to write this XML file on first launch and every launch after:
https://pastebin.com/5U9fsaF1
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.
Thanks.
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:
StoragePath=DEFAULTFILESDIR
In the launcher.ini:
[FileWrite6]
Type=Replace
File=%PAL:DataDir%\Roaming\LAN Messenger.ini
Find=DEFAULTFILESDIR
Replace=%PAL:DataDir:DoubleBackslash%\\Received Files