ZoteroPortable-dev-repo icon indicating copy to clipboard operation
ZoteroPortable-dev-repo copied to clipboard

Setting Custom Data Directory

Open dstark opened this issue 1 year ago • 3 comments

I'm still having the issue described here by another user. Directly modifying ZoteroPortable.ini to specify the data directory works. But is that an intended step to require of users? Or could it be possible to set the data directory within Zotero Portable itself?

Thanks so much!

dstark avatar Jul 12 '22 16:07 dstark

Hello, Yes, this is intended. PortableApps requires the app to be limited to a specific folder. If you don't want to use the default folder, you have to modify the data directory in the .ini file.

But, I must be honest, I don't understand how or why this is an issue. Can you explain me why you are using a custom directory?

pedrom34 avatar Jul 13 '22 06:07 pedrom34

Can you explain me why you are using a custom directory?

Sure, my portableapps folder is in Dropbox, and the Zotero data directory can't be there since it can corrupt the database. So, that needs to be local to a given machine even while Dropbox can sync the rest of the Zotero setup (e.g., extensions, settings) so I don't have to continually make the same setting changes on multiple computers.

That said, modifying the .ini file was pretty straightforward, and the kind of user that would be using this kind of setup is probably the kind that would be comfortable modifying the .ini itself. :-)

Thanks so much.

dstark avatar Jul 13 '22 20:07 dstark

Sorry for the delay in answering, I'm not at home. Thanks, I understand better. Yes, the only solution is to modify the .ini file to stay within the PortableApps specifications. It's a bit of a pain, but it's not very complicated :)

I'll close this issue after editing the readme.md to explain how to do it when I have a moment.

pedrom34 avatar Jul 18 '22 08:07 pedrom34

Updated the readme files.

pedrom34 avatar Aug 17 '22 11:08 pedrom34

Can you explain me why you are using a custom directory?

Sure, my portableapps folder is in Dropbox, and the Zotero data directory can't be there since it can corrupt the database. So, that needs to be local to a given machine even while Dropbox can sync the rest of the Zotero setup (e.g., extensions, settings) so I don't have to continually make the same setting changes on multiple computers.

That said, _mo_difying the .ini file was pretty straightforward, and the kind of user that would be using this kind of setup is probably the kind that would be comfortable _mo_difying the .ini itself. :-)

Thanks so much.

hi, I come across the same problem that I want to keep the addons and settings unchange between two computers. have you solved the problem? If yes, can you share the method? thanks.

Geo123abc avatar Aug 24 '22 15:08 Geo123abc

@Geo123abc, yes, I've got everything for ZoterPortable except the Zotero profile folder in Dropbox. Then, you can follow the guidance here or, as I take it, now in the readme files for Zotero portable to modify ZoteroPortable.ini to point to the proper location for your Zotero profile folder.

dstark avatar Aug 24 '22 18:08 dstark

thanks. I have made sense. I find the key point is the file prefs.js in the folder xx\ZoteroPortable\Data\Mozilla\Profile, this file contain all addons' setting, we should keep it safe. So, you can backup a perfect prefs.js, if the zotero setting encounters problem, just replace the prefs.js file by using the perfect one. but when I copy my ZoteroPortable folder to another computer, start ZoteroPortable.exe, the addons don't work accurately. I wonder to know where is wrong?

Geo123abc avatar Aug 25 '22 13:08 Geo123abc

Late reply, but can be used for future reference.

I think it's possible to change the data directory parameter via shortcut, but make sure the shortcut point to ZoteroPortable.exe, not Zotero.exe. Delete/comment the CommandLineArguments line on App\AppInfo\Launcher\ZoteroPortable.ini to avoid conflicting parameters.

However, now you should be wary when executing Zotero Portable without the added parameters (since you deleted the CommandLineArguments line), because then it won't be portable anymore. The workaround is just make an extra shortcut with the original parameter to prevent that from happening.

The advantage of using shortcut is that you can create as many as you like, for example if you have multiple accounts, then just make 2 shorcuts with 2 different data directories. I can actually make it check if the parameter is empty, then it will write the data to the default Data directory, but that would still be an overkill and make the code unnecessarily complex.

Example: image

AndhikaWB avatar Nov 24 '23 03:11 AndhikaWB