Changes

Jump to: navigation, search

Universal Firefox on a USB Key

511 bytes added, 16:07, 26 February 2008
Version 0.1
We wanted to alter this behavior so that Firefox would read the common profile on the USB Key. We researched for ways to redirect where Firefox was looking for its profiles. We realized that Firefox looked up Profiles.ini in the Windows Application Data folder for the location of each profile. We later discovered that there is a program switch to tell firefox where to get its profile. We initially hard coded the directory and profile used by the command line switch.
firefox.exe -profile "G:\Seneca\firefoxWindowsInstallToStick\Profiles\q928eerv.default"
Using an absolute path name we managed to have Firefox read and write the profile on the USB Key. Next we wanted to change the absolute path into a relative path via a batch script. The following script succeeding in giving us the relative path as long as it was run from the current directory of the batch file. @echo off set currDir=%CD%\ set ff=firefox set profile=Profiles\q928eerv.default set profileDir=%q%%currDir%%profile%%q% set q=" set total=%ff% -profile %profileDir% echo currDir = %currDir% echo ff = %ff% echo profile = %profile% echo profileDir = %profileDir% echo q = %q% echo total = %total% rem this is the concatenated command that is executed rem %total% The challenge was to write a script that would capture the batch file's location no matter where it was run from (e.g. executing the batch file from the C: drive). To solve this problem in the batch script , we added code to find the location of the batch file, have it execute the firefox call from there and then return to the original directory that he user was on.
bash
1
edit

Navigation menu