I just wrote up a short batch script that uses 7zip's encryption to pack up portablefirefox's data folder. Since running firefox from the USB gives such a perfomance hit, my script basically copies the portablefirefox folder to c:\temp & extracts the data folder. When I'm done browsing, I tell it to pack up the data folder back to my thumb drive & delete everything else. It can use a keyfile, or a manual password as I want it to.
I imagine such a thing would be easy to officially implement. It's only a 10 line script which anybody with a bit of programming experience could do. I can post it here if anyone wants it. Any chance something like it could be added to the official version?
I don't notice much of a performance hit off my drive - guess it depends on your drive's speed. Seems a good idea though - why bother with encryption though, as the file is unencrypted to let it run on the host pc...
the idea is provide better security of the data on the flash drive itself in case it gets stolen. I wouldn't mind seeing his batch file myself.
I actually just split it into 2 batch files. Seems easier to avoid making mistakes. Here comes the 1st.
@echo off
echo -------------
echo Extractor script
echo -------------
pause
IF NOT EXIST F:\key.txt (
echo Keyfile not found
pause
GOTO :EOF
)
FOR /F %%A IN (F:\key.txt) Do (
SET Pass=%%A
)
echo Extracting...
echo -----------------
xcopy FirefoxPortable C:\Temp\FirefoxPortable\ /E
"7-Zip\7z.exe" x C:\Temp\FirefoxPortable\Data.7z -oC:\Temp\FirefoxPortable\ -p%Pass%
start C:\Temp\FirefoxPortable\FirefoxPortable.exe
2nd file
@echo off
echo -------------
echo Retractor Script
echo -------------
pause
IF NOT EXIST F:\key.txt (
echo Keyfile not found
pause
GOTO :EOF
)
FOR /F %%A IN (F:\key.txt) Do (
SET Pass=%%A
)
echo Packing up firefox
echo -----------------
Tinyprograms\process -k firefox.exe
Tinyprograms\process -k pstart.exe
del FirefoxPortable\Data.7z.bak
ren Firefoxportable\Data.7z Data.7z.bak
"7-Zip\7z.exe" a Firefoxportable\Data.7z "C:\Temp\FirefoxPortable\Data" -p%Pass%
rmdir /s/q C:\Temp\FirefoxPortable\
A few notes:
I got some little program online for killing processes. That's the where the "-k firefox.exe" lines come from.
In terms of directory setup, there's FirefoxPortable & 7-zip folders on your thumb drive's root. Drive F: is another USB with the keyfile. If you leave out the "-p%Pass%" in the extractor script, it'll prompt you for the password.
Cool little scripts. I've been wondering how to do something like this, both for Firefox and for Thunderbird.
I have two questions:
1. Why extract to the C drive? It seems like that would leave un-encrypted traces if anything went wrong. Is there some advantage I'm not seeing?
2. Why the process-killer? Doesn't that create problems with Firefox not having been closed "properly?"
Tappet
__________________
"I am still learning."
--Socrates
Tappet
__________________
"I am still learning."
--Socrates
Sometimes (rarely) firefox leaves the process running even after exiting. I figure it's not a good idea to pack up when it's running. I'm still on 1.5.0.7 & it doesn't complain when closed like that. I'm using the sessionsaver extension & I imagine it works just as well with 2.0's built in sessionsaver.
As for extracting to C, that one's been covered already
It's for better security on the drive for people who don't have admin rights to install something like truecrypt.