I recently bought a new USB flash drive, and since I don’t feel comfortable with entering personal information on shared computers (you never know what’s going to be left there when you’re done) I decided to install a copy of Opera on it.

If you don’t know it, Opera is the best browser out there, very fast and very light. It has integrated mail, news and IRC clients and it’s free (not open source though).

I like having my mail client bundled in my browser because I can put it on my USB drive and securely (SSL) access my mail anywhere. I tried to find instructions on how to do it but all I found was a page that said I had to download a program and make it run each time I wanted to start Opera. It seemed to me that there must be a simpler way, so I tried for myself and it works perfectly. Here’s what I did:

Download the latest version of Opera (I chose 9.0tp2, I’m sure 8.5 will work as well) and install it. Do not choose “multiple profiles”, make it install one set of settings for all users. Once it’s installed open it and customize it however you like. Afterwards, open the OperaDef6.ini file in the Opera folder and replace all occurrences of the directory you installed it in with the directory you’re going to put it in your USB stick.

For example, I installed it in “C:\Program Files\Opera” and wanted to put it in my USB stick in the “F:\Opera” directory, so I replaced “C:\Program Files\Opera” with “\Opera”. Do not add the drive letter to the beginning of the string, just start it with a backslash and write the rest of the path. Now copy Opera to your flash disk and you’re ready to go. By the way, you can delete the “uninst” directory if you want to save 200 KB. Depending on what you did, you may also need to do the same for the files “mail\account.ini”, “mail\index.ini” and “profile\opera6.ini”. An easy way to find them is to open the Windows Search dialog (or grep, if you are so inclined) and search for the string “C:\Program Files” (or whatever you installed Opera in) and change it in those files.

For simplified instructions if you’re not very advanced, install Opera to the default location, uncheck “use multiple profiles”, optionally customize Opera, open the file “C:\Program Files\Opera\OperaDef6.ini”, remove all the “C:\Program Files” strings so that you’re only left with, for example, “\Opera\images\folder.gif”, etc. Copy the Opera folder to your thumb drive, and you’re set.

This works because the flash drive is always a root drive, and absolute paths work with Opera, so you don’t have to use the actual drive letter, Opera will know where to find its files immediately.

As always, post comments here if you have any questions.