What is the trick to get PortableApps to use the Data directory?
The application keeps using:
C:\Users\\AppData\Local\
I want it to use:
\Data
Thanks,
Jake
New: Kanri (Oct 09, 2024), Platform 29.5.3 (Jun 27, 2024)
1,100+ portable packages, 1.1 billion downloads
No Ads November!, Please donate today
Some apps have a specific command line switch or environment variable to point some or all of its data to a specific location.
Some apps don't however, and you will need to set up the PortableApps Launcher to copy the data between the location the app puts it, and the \Data directory. This can be done with [FilesMove] and/or [DirectoriesMove] in the launcher.ini.
It appears the [DirectoriesMove] just moves the directory from the PAL to the location specified.
I've been trying to get the Launch.ini\CommandLineArguments to take the parameter to choose a different location.
Also tried [AdditionalParameters].
Many apps will only save to LOCALAPPDATA with no way to tell them to store elsewhere (command line or environment variable for instance). For those, we have the PortableApps.com Launcher move data back and forth from there, backing up any existing data while running. All our released apps work that way.
If you're making your own app, you'll want to read up on DirectoriesMove.
Sometimes, the impossible can become possible, if you're awesome!
I think I'm getting closer to figuring it out. The application does use command line parameters to tell it where to store user data. The confusion is the multiple AppNamePortable.ini files.
There is a Launcher .ini.
There is another .ini next to the AppNamePortable.exe file too.
They both are named AppNamePortable.ini
The one contained in App\AppInfo\Launcher is for the developer to control how PAL works in terms of portablizing the app. It's the only one you need to worry about.
The one contained in Other\Source as an example which can be moved alongside AppNamePortable.exe is only for an end user to do things like disable the splash screen and pass optional command line arguments to the app that a user would be interested in (for example, passing -safe-mode to Firefox to troubleshoot a problem). This file can not be distributed with your app and is not for your use as a developer.
Sometimes, the impossible can become possible, if you're awesome!