You are here

[solved] Moving profile folder

7 posts / 0 new
Last post
orschiro
Offline
Last seen: 9 years 1 month ago
Joined: 2012-01-07 14:42
[solved] Moving profile folder

Hello,

I want to make Zotero Standalone fully portable. However, on start-up Zotero creates a profile folder C:\Documents and Settings\username\Application Data\Zotero\Zotero with the following content:

|profiles.ini
|||Profiles/
|||||f450im62.default/
||||||||[...]
|||||||||zotero/

Zotero\Profiles\f450im62.default\zotero is the actual folder which Zotero uses. I would like to store this profile in Data\profile.

How can I tell Zotero to create its profile folder in Data\profile and use this one as default?

I tried to use DirectoriesMove in my launcher.ini as follows without any success:

[DirectoriesMove]
%APPDATA%\Zotero=%PAL:DataDir%\profile

You can view the complete source code here: https://github.com/orschiro/PortableApps/tree/master/Zotero%20Standalone...

John T. Haller
John T. Haller's picture
Offline
Last seen: 1 hour 41 min ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Command Line

Have you tried passing it the -profile command line switch and pointing that to %PAL:DataDir%\profile

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

Ken Herbert
Ken Herbert's picture
Online
Last seen: 2 min 3 sec ago
DeveloperModerator
Joined: 2010-05-25 18:19
Your [DirectoriesMove]

Your [DirectoriesMove] doesn't work because you've got it backwards.

You would need profile=%APPDATA%\Zotero\profile to have a directory called profile in Data moved to App\Zotero\profile on startup.

But as John says, use the command line switch. If an app provides a way to redirect profiles/settings/etc you should always try to do it that way instead of manually making the launcher do it.

orschiro
Offline
Last seen: 9 years 1 month ago
Joined: 2012-01-07 14:42
Created bat file

Thanks for the hint with the -profile option.

I created a bat file which launches Zotero as follows and which is working great:

START zotero.exe -profile "..\..\Data\profile"

Ken Herbert
Ken Herbert's picture
Online
Last seen: 2 min 3 sec ago
DeveloperModerator
Joined: 2010-05-25 18:19
Don't use a batch file, it

Don't use a batch file, it isn't supported.

Use CommandLineArguments in your launcher.ini instead.

orschiro
Offline
Last seen: 9 years 1 month ago
Joined: 2012-01-07 14:42
Learning progress

Thanks! I did not know about this option. Very clean solution.

tapsklaps
Offline
Last seen: 6 years 1 month ago
Developer
Joined: 2010-10-17 08:11
false code

Your developed code in the section [DirectoriesMove] is invalid due to the usage of the environment variable %APPDATA%. The "%APPDATA%\Zotero" is the location of the source directory, relative to the portable data directory (AppNamePortable\Data). The "%PAL:DataDir%\profile" includes the directory you want it to go to, so %PAL:DataDir%\%APPDATA%\Zotero\*.* gets copied to %PAL:DataDir%\profile\*.*.

But what is now the exact meaning of "%PAL:DataDir%\%APPDATA%\Zotero\*.*"? It leads to the following concrete path:

X:\PortableApps\AppNamePortable\Data\C:\Documents and Settings\username\Application Data\Zotero\*.*

This path contains 2 drive letters (X and C), which leads to a failure.

Instead you should use the following code:

[DirectoriesMove]
Zotero=%APPDATA%\Zotero
Log in or register to post comments