You are here

[Solved] How does Firefox launcher handle %appdata% removal when closing?

5 posts / 0 new
Last post
SanPe'
SanPe''s picture
Offline
Last seen: 2 weeks 6 days ago
Developer
Joined: 2017-08-18 05:46
[Solved] How does Firefox launcher handle %appdata% removal when closing?

Hi,

I just created Zotero 5 portable (https://portableapps.com/node/56957), and I have a problem with it. At each launch, even if the datadir is specified to be in the Portableapp folder, it create data in %appdata%\Zotero. I downloaded a template and modified launcher ini, but I cannot find the right settings...
If I delete this folder, Zotero runs like it's the first time, and opens an url in the default browser. User data is safe though.
As Zotero 5 is based on Firefox, I suppose it needs to be portablized the way Firefox is... Is there someone here that could explain to me how firefox is portablized? Is it with DirectoriesMove section in Launcher ini?

Thanks !

SanPe'
SanPe''s picture
Offline
Last seen: 2 weeks 6 days ago
Developer
Joined: 2017-08-18 05:46
Ok, I realized that it's

Ok, I realized that it's maybe handled with a custom NSIS script. That's way beyond my actual skills... Is there a way to tell the launcher to backup content in %appdata%\Zotero when closing and restore when opening in the launcher.ini file?

Please, someone say yes.

mjashby
Offline
Last seen: 1 day 1 hour ago
Developer
Joined: 2008-09-19 13:35
PortableApps - Development Guidance
SanPe'
SanPe''s picture
Offline
Last seen: 2 weeks 6 days ago
Developer
Joined: 2017-08-18 05:46
Thanks, but

Thanks, but I already saw this guide, and I cannot figure out which option could work in my case.

At the moment, the program create on first launch a folder in %Appdata%. If I delete the folder with -=%Appdata%\folder when the program exists, it will be re-created on re-launch, and the program will consider it's the first launch.
I think it's related to the fact that Zotero is based on Firefox. The folder created on first launch contains a subfolder called profile and a profiles.ini file. Then there's a xxxxxxxx.default folder with a prefs.js file and other stuff.

I need the launcher to copy what Zotero creates on first launch, delete it from %appdata% at exit, and then copy it back to %appdata% on relaunch.

Phew. I'm a bit lost here.

SanPe'
SanPe''s picture
Offline
Last seen: 2 weeks 6 days ago
Developer
Joined: 2017-08-18 05:46
I found a way to do what I

I found a way to do what I want!
It was under my nose here:
https://portableapps.com/node/36546

Log in or register to post comments