You are here

Problem with changing default settings saving location path

9 posts / 0 new
Last post
Peter8087
Offline
Last seen: 4 years 12 months ago
Joined: 2013-07-06 12:43
Problem with changing default settings saving location path

I want to change the default save location of a program that i am trying to make portable. This is my first attempt to make a portable program with portableapps.com launcher so i hope someone can help me.

The program saves its settings in C:\Users\xxxx\AppData\Local\Just Gestures. I want to make it saves the settings in E:\PortableApps\JustGesturePortable\Data\JustGestureSettings.

This is what i have in launcher.ini:

[Launch]

ProgramExecutable=Just Gestures\JustGestures.exe

[DirectoriesMove]

%APPDATA%\Local\Just Gestures=%PAL:DataDir%\JustGestureSettings

But it is not working.

What i am doing wrong?

John T. Haller
John T. Haller's picture
Online
Last seen: 11 min 46 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Moves

Just to clarify, the PA.c Launcher doesn't change where it saves them, it moves them back and forth. It moved them in (backing up anything there) on the start of the app, and then back out (restoring what was there) on exit of the app.

As for the launcher ini, you've got things a bit backwards. Your DirectoriesMove section should be something like:

[DirectoriesMove]
config=%LOCALAPPDATA%\Just Gestures

That would move the contents of Data\Config to C:\Users\xxxx\AppData\Local\Just Gestures and back. You want to use %LOCALAPPDATA% instead of %APPDATA%\Local so it works on other machines.

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

Peter8087
Offline
Last seen: 4 years 12 months ago
Joined: 2013-07-06 12:43
Thanks, now it is working,

Thanks, now it is working, but i am confused about the moving back and forth operations.

If i have one program installed in the standard way and also the same program in portable format when i start the portable program how is it not overwriting the settings of the installed program when is it moving the data files to AppData folder on startup?

John T. Haller
John T. Haller's picture
Online
Last seen: 11 min 46 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Backup

It backs it up before running the portable one and restores it when it exits.

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

Peter8087
Offline
Last seen: 4 years 12 months ago
Joined: 2013-07-06 12:43
I have noticed that the

I have noticed that the portable Firefox doesn't move the files from my portable profile folder E:\PortableApps\FirefoxPortable\Data\profile to C:\Users\xxxxx\AppData\Roaming\Mozilla\Firefox\Profiles. It creates a Profiles folder but it is empty. I have only portable version of Firefox installed.

How this is done?

John T. Haller
John T. Haller's picture
Online
Last seen: 11 min 46 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
App Itself

Sometimes, the app itself provides a way to redirect certain settings. In this case, Firefox provides a command line switch called -profile that allows us to redirect many of its settings. Not all of them, unfortunately, so we still need to clean up some directories and registry entries on the local machine and adjust paths within Firefox's settings as you move PCs. Most apps do not provide a method of doing this.

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

Peter8087
Offline
Last seen: 4 years 12 months ago
Joined: 2013-07-06 12:43
What is preventing Just

What is preventing Just Gesture launcher to save the settings on Windows shutdown, because now i am receiving message that Just Gesture didn't close properly last time on Windows startup? If i understand correctly on Windows shutdown for some reason the launcher doesn't move back the data files from AppData to Data/config, correct?

John T. Haller
John T. Haller's picture
Online
Last seen: 11 min 46 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Limitation

That's a limitation of both Windows shutdown and PAL. PAL can't interrupt a Windows shutdown. And a Windows shutdown doesn't give apps enough time to fully save their data otherwise. So, the launcher is shut down before JG is, making it non-portable. You should always close your portable apps before closing down Windows. The next PA.c Platform release will let you close them all at once.

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

Peter8087
Offline
Last seen: 4 years 12 months ago
Joined: 2013-07-06 12:43
Actually, this autohotkey

Actually, this autohotkey script is working well and closing the apps properly on Windows shutdown: https://portableapps.com/node/37545

Kudos to the guy who made it!

Log in or register to post comments