You are here

Which is preffered? DirectoriesMove or Enviroment

2 posts / 0 new
Last post
Ev1l0rd
Offline
Last seen: 8 years 4 months ago
Joined: 2015-12-17 05:36
Which is preffered? DirectoriesMove or Enviroment

I'm writing a portable app for a game, but said game stores it's data in My Games in the Documents folder. To make said app portable I've got two choices if I have read the documentation correctly:

- Use [Enviroment] in launcher.ini to set the folder like this:
USERPROFILE=%PAL:DataDir%\1.0-alpha

- Use [DirectoriesMove] to move the folder to a subdirectory in /Data like this:
exampleggame=%DOCUMENTS%

Which of these two is typically used, and why?

John T. Haller
John T. Haller's picture
Online
Last seen: 12 min 18 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
USERPROFILE dangers

It's recommended to not redirect USERPROFILE. Environment is passed between processes, so if you launch a browser from a game... for help, donations, purchases, about, forums, etc... the browser will also look there and it'll mess things up. The only apps that we have ever redirected USERPROFILE for are very simple ones where we've looked at the code and never launch anything external.

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

Log in or register to post comments