You are here

Calculate UAppData for Portable Install

2 posts / 0 new
Last post
yajd
Offline
Last seen: 9 years 11 months ago
Joined: 2014-05-08 14:01
Calculate UAppData for Portable Install

Hi all (and John Smile )

From addon scope, the special path UAppData does not update for FirefoxPortable, is there a way I can calculate this path in my addon.

Special path obtained by: Cc["@mozilla.org/file/directory_service;1"].getService(Ci.nsIProperties).get('KEYWORD_HERE', Ci.nsIFile).path;

UAppData is giving me: C:\Users\C71ZQW1\AppData\Roaming\Mozilla\Firefox
This path is valid IF and only if Firefox was HARD/FULL installed (as in not portable) to anywhere on the C drive.

But I have installed FireefoxPortable to: C:\Users\C71ZQW1\Desktop\FirefoxPortable

Can you please help me calculate the correct UAppData based on the results returned by other special paths.

For my portable app this is what all is returned by all the special path keywords:
https://gist.github.com/yajd/ed58adda53d5ef513c1f#comment-1224528

Thanks

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

UAppData does not change with the portable version. Firefox always treats it as 'APPDATA\Mozilla\Firefox' where APPDATA is the user's Application Data folder as defined by Windows (C:\Users\xxxx\AppData\Roaming on modern Windows).

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

Log in or register to post comments