You are here

Local profile gone after install

5 posts / 0 new
Last post
drew.w
Offline
Last seen: 9 years 11 months ago
Joined: 2014-05-19 13:32
Local profile gone after install

Hi Folks,

After installing Portable Firefox on a thumbdrive, the local PC installation of Firefox has lost my local profile. Is there a special install method to avoid this or have I done something wrong?

My Windows 7 installation of Firefox uses Junction Points from the C: to D: drives:

C:\Users\Drew\AppData\Roaming\Firefox -> D:\Users\Drew\AppData\Roaming\Firefox

It appears that the Junction Point is removed by the Portable Firefox installation process Sad

John T. Haller
John T. Haller's picture
Online
Last seen: 12 min 47 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
Windows Junction Points Are Buggy

Windows junction points don't work properly with standard directory handling. So, when the Firefox launcher checks to see if the directory is empty, Windows tells it that it is, even though it isn't. Also when existing directories are renamed - for example, if APPDATA\Firefox existed and the launcher wanted to back it up to APPDATA\Firefox-Backup so the portable version can create and use APPDATA\Firefox while running and then renaming it back on exit - that will break your custom junction point, too. The bottom line is if you use custom junction points within APPDATA, it's gonna break with some portable apps. You can use a junction point for all of APPDATA and that will work with portable software. But a custom junction on APPDATA\Firefox will not.

Your data should unaffected, you'll just need to recreate your custom junction point. I say should because junctions are buggy.

Side Note: The installer doesn't touch APPDATA. Only the launcher.

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

drew.w
Offline
Last seen: 9 years 11 months ago
Joined: 2014-05-19 13:32
Understood - Junctions Points are bad

John, Thanks for your detailed response. I'm more comfortable with Linux style links and had to use an alternate solution on Windows. Would you know of a more reliable symlink method for Windows?

-Drew

Kooky Tommy
Offline
Last seen: 9 years 11 months ago
Joined: 2014-05-22 06:42
An idea

(Sorry my English.)

Hi,

Same problem. I use Firefox ESR and Thunderbird, locally and portable versions. I use symbolic links for local profiles. After closing portable version, symbolic link is gone.

I have an idea. Maybe a little expansion or a function help? (NSIS is new for me.)

Original:

RMDir "$APPDATA\Mozilla\Firefox\"
RMDir "$APPDATA\Mozilla\"

Expanded:

IfFileExists "$APPDATA\Mozilla\Firefox\*.*" +2
RMDir "$APPDATA\Mozilla\Firefox\"
IfFileExists "$APPDATA\Mozilla\*.*" +2
RMDir "$APPDATA\Mozilla\"

John T. Haller
John T. Haller's picture
Online
Last seen: 12 min 47 sec ago
AdminDeveloperModeratorTranslator
Joined: 2005-11-28 22:21
RMDir does that

RMDir without the /r switch only removes a directory if it is empty. It asks Windows if $APPDATA\Mozilla\Firefox is empty. Windows, being dumb about the bugginess of symbolic links, says 'yup, it's empty'. And then the directory is removed.

Reference: http://nsis.sourceforge.net/Reference/RMDir

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

Log in or register to post comments