Sign up | Lost password? | Help

[ advanced search ]


Go to last post

Tuesday, 2. March 2004, 22:52:00

Naranek

avatar

Posts: 9

Opera on a stick

Is there any way to install opera so that it would run from a single directory? It would be great to have a personal Opera with all the bookmarks & mail accounts etc on a portable USB Memorystick where ever I go. Any suggestions about how to achieve this?

Wednesday, 3. March 2004, 01:58:26

Saddle Magic

Psycho Chicken What_The_Cluck!

avatar

Posts: 19062

I don't know if it will run on a Memorystick but, if you install Opera for a single user all the files go in the Opera directory and subdirectories. I don't think that applies with Win2k or WinXP though, but I'm not sure about that.

Wednesday, 3. March 2004, 03:09:08

Well, there have to be paths specified to some files in the opera6.ini (fx Toolbar Configuration=F:\Opera\toolbar\toolbar.ini). I'm not sure whether Opera can handle relative paths. If not, always the same drive-letter had to be assigned to the memory stick. Hardly manageable on different systems, I think.

But, give it a try...and tell us what happened.:D

Wednesday, 3. March 2004, 04:34:31

henrah

avatar

Posts: 2

this is afantastic idea - wish i could contribute, but please keep us updated :smile:

Wednesday, 3. March 2004, 21:58:31 (edited)

Naranek

avatar

Posts: 9

A little progress

I started experimenting with a fresh single user install of Opera 7.23. It installed just fine on the memory stick. I feared that it would mess up my current installation of opera, but it seems that it runs completely separated. So far so good. I don't think that this will be all that big an operation.

Edit:
A little update: I'm not the first to try this sort of thing. A little searching of the older messages revealed that this has been tried before, and in various ways. The simple solution is to use a virtual drive letter, and it seems to work fine. However I won't go for nothing but perfect so I'm hacking the ini-files. Almost everything is working (I even have a custom skin), but emails and about-page are broken. I think it has something to do with mime.css and other stylesheet-related files.

Wednesday, 3. March 2004, 21:07:36

Saddle Magic

Psycho Chicken What_The_Cluck!

avatar

Posts: 19062

Opera 3.xx could run from a floppy disk.

My guess is either this will work or it won't. What I mean is if it does not work and you have to do more than a little tinkering with it, it will probably not work.

Friday, 5. March 2004, 22:24:25

Naranek

avatar

Posts: 9

Conclusion

OK, it's done. Here's a guide how to do it. It worked for me and i suppose it should work for you too. After this procedure you have Opera.bat which you should run when ever your drive letter changes. It will update all necessary files and start Opera.

The folder I installed opera is DRIVE:\Opera . If you want to install to a different directory you'll have to edit the Opera.bat

1) Install Opera in single user mode into the \Opera folder
2) Download XChangeCL from [url]http://www.simes.clara.co.uk/programs/xchangecl.htm
3) Place XChangeCL.exe into DRIVE:\Opera\utils directory
5) Delete all drive letters from \Opera\profile\opera6.ini
(example: change "Opera Directory=D:\Opera\profile" to "Opera Directory=\Opera\profile")
6) Replace all drive letters from \Opera\OperaDef6.ini with HaKeMiStO (example: BUTTON SET=HaKeMiStOOpera\skin\Standard.zip) . It's Finnish. Don't worry about it, a batch file will replace it later.
7) Move OperaDef6.ini to \Opera\utils\ directory
8) Make \Opera\Opera.bat (Open notepad, write the following code and save it as Opera.bat) It will make you a fresh OperaDef6.ini file and start Opera when ever you run it.
@echo off
cd \
copy /Y \Opera\utils\OperaDef6.ini \Opera\OperaDef6.ini 
\Opera\utils\xchangecl -B \Opera\OperaDef6.ini /HaKeMiStO/%cd%/
start /max \Opera\Opera.exe 


Hope this is of use to someone. I personally just love my new portable Opera. :love: I'm happy to answer any questions you might have.

Friday, 5. March 2004, 22:31:46

Saddle Magic

Psycho Chicken What_The_Cluck!

avatar

Posts: 19062

Very good :up: How many different computers have you tried this on so far?

Saturday, 6. March 2004, 10:19:41

Naranek

avatar

Posts: 9

I've done the install once, and tried it on three computers. With one I switched the drive letters a few times. On this computer I copied the files to a hard drive in the \Opera directory and it works fine this way too. I'm planning to use this computer over weekend and when I leave I'll just delete the directory.

I'll make a package with edited files next week. It's more convenient and I can more easily fix any bugs I might encounter. Now it seems that Java doesn't work even if it's already installed on the computer. A change in \Opera\classes\Opera.policy file fixes that though.

Saturday, 6. March 2004, 11:10:54

That would be cool, as I'm currently stuck with MyIE2 at school (5mb limit, Opera would fit -4.5mb, but doesn't allow for much more content, MyIE2 is happy with 900kb).

I don't have a memory stick, but anyway... I plan on buying one sometime... maybe I should push myself forward, the problem is that as an alternative I'm also thinking about buying a mp3/ogg/wma harddisk player of 20gb, (and only if it's also usable as USB portable harddisk), and I have one about which I'm thinking... only it's a lot of money and I'm not sure on how much I'd actually use it. If it wouldn't be on an almost daily basis it would be a kinda waste of money you see. :wink:

Thursday, 11. March 2004, 16:25:05

kooshball

avatar

Posts: 10

Re: Conclusion

Originally posted by Naranek

5) Delete all drive letters from \Opera\profile\opera6.ini
(example: change "Opera Directory=D:\Opera\profile" to "Opera Directory=\Opera\profile")



i dont have a profile folder in my opera install folder.
do i copy this from the application folders?
thx

koosh

Thursday, 11. March 2004, 20:32:42

Mohjive

Secret member

avatar

Posts: 887

Sweden

Re: Conclusion

Originally posted by Naranek
<snip>
6) Replace all drive letters from \Opera\OperaDef6.ini with HaKeMiStO (example: BUTTON SET=HaKeMiStOOpera\skin\Standard.zip) . It's Finnish. Don't worry about it, a batch file will replace it later.

\Opera\utils\xchangecl -B \Opera\OperaDef6.ini /HaKeMiStO/%cd%/


Instead of "HaKeMiStO" you could write "ChangeThisToDriveLetter" or some other text that you are sure not already exists in OperaDef6.ini and that are understandable by someone non-finnish (No offence Naranek)

Originally posted by kooshball

i dont have a profile folder in my opera install folder.
do i copy this from the application folders?



Are you sure you installed Opera in single user mode. Make sure the "Individual Opera profiles for each user on this computer" checkbox is unchecked.

Saturday, 13. March 2004, 02:45:15

Giannis_rho

avatar

Posts: 3

:smile: How I run Opera from a cd
Copy contents of zip to Opera folder and run MyOpera.bat
to clean it run MyOperaClean.bat
MyOpera.zip

:D

Thursday, 1. April 2004, 13:49:52

Thanks Naranek, that solution works pretty well. The only issue I have is that XchangeCL says it is shareware. Is this actually a permanent solution, or will it stop working after 30 days?

Giannis_rho, your solution may work, but I was put off by things being greek. I tried deleting the greek language file, wich fixed most thigs, though some menus stayed greek for some reason. Maybe I should have tried longer, but I gave up and used Naranek's instead.

Thursday, 1. April 2004, 13:56:53

Oh, and another thing, does anyone know how to change where Opera puts its cache?

I would rather it go in temp folder (such as C:\temp) wherever I go to save space on my memory stick, and to reduce memory stick 'disk' activity since it is slower than a HD.

Thursday, 1. April 2004, 14:30:29

Originally posted by Jarrah
Oh, and another thing, does anyone know how to change where Opera puts its cache?
I would rather it go in temp folder (such as C:\temp) wherever I go to save space on my memory stick, and to reduce memory stick 'disk' activity since it is slower than a HD.


[User Prefs] in opera6.ini:
Cache Directory4 = "C:\windows\temp" should do the job.

One more thought: I think I wouldn't recommend the above, because Opera could delete all files in the cache directory. I think it would be better to create something like "C:\windows\temp\oprcache" in the start batch file and use this directory.

Friday, 23. April 2004, 10:31:22

I'm having problems getting this to work.

I am trying to run it from three different computers all with different hardware configurations.

The first time I try it on it works fine but on every other time I try it on I keep on getting error messages saying files in the opera cache are corrupt.

Does anybody know what I have done wrong or have any way of fixing it as I would really like to get this to work.

Friday, 23. April 2004, 12:21:09

What do you mean specifically by 'this' is not working? Placing the cache on the local disk? If so, try checking 'Empty cache on exit' in Preferences (Alt+P) > History & Cache and make sure you close Opera properly (using the 'x' button / File > Exit / Ctrl+Q).

You have to leave enough time for Opera to close. This necessary time after the Opera window has vanished varies, depending on the length/heaviness of usage. On my machine (1,3Ghz Duron, 512 MB RAM) this can take up to 3 minutes after a whole day of work. You can check in the Task manager.

Note that I'm not using Opera from a stick, so this is not proved, but if I were in your shoes that's the first thing I would try.

Wednesday, 28. April 2004, 18:10:49 (edited)

Matthew

avatar

Posts: 55

I've got it working on my watch (which acts as a memory stick) using MiniTrue: just requires a small edit to the batch file.

@echo off
cd \
copy /Y \Opera\utils\OperaDef6.ini \Opera\OperaDef6.ini 
\Opera\utils\mtr -b:txt \Opera\OperaDef6.ini DriveLetter = %cd%
start /max \Opera\Opera.exe 


Think that's right. Works on this setup, now to try it somewhere else (and get it customised! :smile:)

Edit1: added the backup extension ":txt"

Wednesday, 28. April 2004, 17:30:22

Saddle Magic

Psycho Chicken What_The_Cluck!

avatar

Posts: 19062

Try assigning a sound to "Opera exit", I think that will reveal when Opera has completed it's housekeeping duties.

Wednesday, 28. April 2004, 19:28:28 (edited)

Matthew

avatar

Posts: 55

Okay, I have a problem. MTR thinks the \ in F:\ (my directory) is an escape character. The %cd% doesn't work as it thinks the last character is an escape character. Any ideas how to solve that?

Edit: Here's my current batch file, tring to find a way arround this. What I can't understand is that the "cd \Opera" line throws up the error message "System cannot find path specified". The copy and start commands both work with that directory though :cry:

@echo off
cd \
copy /Y \Opera\utils\OperaDef6.ini \Opera\OperaDef6.ini 
set folder=%cd%
set folder=%folder:\=%
echo %folder%
cd \Opera
\utils\mtr -b:txt -o OperaDef6.ini DriveLetter=%folder%
ping google.com
start /max \Opera\Opera.exe

Thursday, 29. April 2004, 02:09:27

I think I remember in the MiniTrue documentation that \\ will work in place of \ if you are having trouble with escape characters. I don't have it with me, but it talks about it in the one big txt file that MiniTrue comes with.

Thursday, 29. April 2004, 06:06:15

Matthew

avatar

Posts: 55

Yeah - the thing is the %cd% variable contains just one \ and so it was harder to add to the end. But the trailing \ in F:\ isn't necessary as in the OperaDef6.ini file it's DriveLetter\Opera\ etc. so DriveLetter needs to be replaced by F: anyway. Which I've done.

The problem now is to get it to recognise the folder \Opera on line 7, which for some reason it doesn't :cry:

Thursday, 29. April 2004, 06:11:00

Matthew

avatar

Posts: 55

Okay, for now I've set up two batch files, one which just runs it (to get around the restriction of *.exes at my school) and one which I'm working on and will run when the drive letter changes. Hopefully this will give me a working Opera-on-a-stick (I like this name for some reason :smile:) for now.

Thursday, 29. April 2004, 11:07:42

Here, use this batch file...

@echo off
cd \
copy /Y \Opera\utils\OperaDef6.ini \Opera\OperaDef6.ini
rename %cd%opera\operadef6.ini t.ini
\Opera\utils\mtr -fnb- opera\t.ini DriveLetter = %cd%\
rename %cd%opera\t.ini OperaDef6.ini
ping google.com
start /max \Opera\Opera.exe

Notice the %cd%\ it's the slash there that fixed the problem you were having.

But I found another problem of it not finding OperaDef.ini - which was worked around through te renaming of the file. Don't ask me why, but it works.

Friday, 30. April 2004, 06:48:56

Matthew

avatar

Posts: 55

Sounds good, I'll give it a go when I have a chance. Unfortunately my school blocks *.bat execution as well as *.exe so no replacing IE there, but never mind... :/

Saturday, 1. May 2004, 09:54:47

hvkasteren

avatar

Posts: 13

I was just looking through some ini files, and i found this in the standard_menu.ini:
[Help Contents Menu]

Item, 50525= Go to page, "opera:/help/mouse.html"


It looks like the opera: is a pointer to the installed directory of opera. Perhaps it can be used in the inis to make it ignore what drive it's on.

Saturday, 1. May 2004, 10:28:13

Neither
opera:/skin/opera5.png
nor
opera:skin/opera5.png

Does view the image which is in my opera75b1/skin/opera5.png so it doesn't work. (only for the help dir)

Saturday, 1. May 2004, 16:29:37

minisu

avatar

Posts: 1351

Sweden

I wish that this was an option in the Opera installer :wizard:

Monday, 3. May 2004, 16:13:51

Opera-on-a-stick Installer

Now, most people should be able to follow the instructions in this thread about how to get Opera-on-a-Stick, but to save people time I've made a couple of batch files that do the whole thing for you. Too easy huh!

Download Opera-on-a-Stick.zip, attached to this message. It's really a .rar archive, but most zip progrms should be able to open it. It was the only way to get beneath the forum file size limit. If you have trouble, have a look for WinRar.

So you open the zip, read the readme.txt, then see what you think. Basically, it copies the required batch files to your flashdrive, backs up OperaDef6.ini and edits it to be used with MiniTrue, which is included along with it's documentation.

Could you ask for more? Well, yes, this looks ugly and has no error checking. But it does work (it's not really that hard).

opera-on-a-stick.zip

Friday, 7. May 2004, 13:58:25

Ok, I've found that the above methods don't work on WinME or Win98.

The %cd% variable used in batch files returns current directory when used in WinXP and WinNT, but not WinMe or Win98.

It was used to pick up the drive letter, as it would return H:\ when in the root of the flashdrive. Thus having it not work is a critical issue for getting this to work.

I will spend a little time trying to get this to work. If anyone has found a solution already, I would be pleased to know as my DOS knowledge is fairly basic and this kind of project usually requires me to spend hours researching.

In addition to this, I have been working on a batch file that will update the backed up OperaDef6.ini after you make chenges in Opera that get stored there. Using Opera-on-a-stick, your OperaDef6.ini is replaced every time you start Opera, so you lose changes such as where your homepage is.

I am a bit busy with uni work, so this could take a little time, and will probably be posted here before it is perfect.

Monday, 10. May 2004, 07:28:18

cesium

avatar

Posts: 168

Israel

Use two files. The first (lets call it "FrstFile") contains only "set CD=" (without a linebreak after). The second works like this:


@echo off
copy FrstFile FrstFile.bat
cd\
cd >> FrstFile.bat
call FrstFile.bat
rem actually executes set CD=DriveLetter:\
del FrstFile.bat



(a more independent solution would be:


@echo off
copy /y FrstFile FrstFile.bat
md random
rem for speed with tree
cd random
tree | find "." >> ..\FrstFile.bat
cd ..
rd random
call FrstFile.bat
rem actually executes set CD=DriveLetter:.
del FrstFile.bat


If you don't want it to change directories )

It's all an ugly hack, but that's the best possible with DOS 6.x-7.x. I miss 4DOS!

Anyway, opera can include environment variables in the ini files since 7.20, so you shouldn't have to use MiniTrue.

Monday, 10. May 2004, 15:29:32

Matthew

avatar

Posts: 55

Wait... what environment variable would you use?

Monday, 10. May 2004, 18:05:12

Mohjive

Secret member

avatar

Posts: 887

Sweden

How about %CD% ?

Monday, 10. May 2004, 19:43:45

Matthew

avatar

Posts: 55

Okay, so that's what he meant. I thought it might be an Opera-specific one.

Friday, 14. May 2004, 15:49:44

Originally posted by cesium
cd >> FrstFile.bat



I found that this overwrote the contents of the file when used in Win98, instead of appending.


tree | find "." >> ..\FrstFile.bat



Win98 doesn't support tree


environment variables... %CD%



Win98 doesn't support %CD%

(Maybe my 98 is just broke, but it doesn't do most useful DOS things)

But I have found a method that works equally well in 98 and XP, so should be fine on any windows system (using senvar.com).

I'm cleaning up the batch files and making a little installer thing like last time to save mistakes being made. There's still an hour or two's work to be done on it, and it is 1:22 AM, so I'll post it in a day or two.

Saturday, 15. May 2004, 08:00:22

Opera-on-a-Stick Installer v2.0

Here is a better version of the Opera-on-a-Stick installer.

Changes from last time:

~ Now has error checking to see that Opera exists at the specified location
~ Works on 98 and XP, so should work on all windows (old version only worked on XP/NT)
~ Strips drive letters from Profile\Opera6.ini, as needed (I think I may have left this out of the first version)
~ Any changes to OperaDef6.ini will be remembered between sessions


Instructions:

1) Download Opera-on-a-Stick-a.zip from this post, and Opera-on-a-Stick-b.zip from the next post. Opera-on-a-Stick-a.zip contains all the batch files and senvar.com. Opera-on-a-Stick-b.zip contains only mtr.exe, so you might not need to download it if you have mtr.exe already.

2) Unzip both files to the same place. Mtr.exe should end up in the Opera-on-a-Stick\minitrue\ directory. If you didn't download the second .zip file, you will need to put mtr.exe there yourself. If you don't, the installer will tell you to do it.

** Read the readme.txt for instructions!
or:

3) Install Opera to your flashdrive as a single user (uncheck multiple profiles in Opera install dialog). Take note of the drive letter of your flashdrive.

4) Run Opera-on-a-Stick.pif. A dialog box will pop up, enter your drive letter (i.e. I would enter H:)

5) Run opera\opera.BAT to start opera.

Everything should run perfectly (I've done quite a bit of testing), but readme.txt has more info. Everything is contained in batch files, so you can see exactly what is being done to your computer.

Two freeware third party programs are used: Minitrue and Senvar. All documentation for these is included.

opera-on-a-stick-a.zip

Saturday, 15. May 2004, 08:10:22

Part b of installer discussed above. Contains only mtr.exe, also available from [url]http://www.pagesz.net/~minitrue.

Note: The file above is packaged as .zip, so everyone should be able to use it. This one is packaged as .rar, renamed to .zip. It was too big to upload otherwise.

If you can't extract .rar files, go to the page above to get minitrue, or look for a Rar program [url]http://www.google.com/search?q=rar&sourceid=opera&num=0&ie=utf-8&oe=utf-8

opera-on-a-stick-b.zip

Thursday, 20. May 2004, 15:34:27

roessler

avatar

Posts: 48

Europe

Thanks Jarrah!

:hat: :hat: :hat: :hat:
Thanks mate for this I guess it'll be very useful for lots of people!
Definitely for me!!
:hat: :hat: :hat: :hat:
By the way is this the final version?

cheers...

Friday, 21. May 2004, 03:21:18

It is a final version until bugs are found. :wink:
(see [url]http://my.opera.com/forums/showthread.php?s=&postid=551766#post551766 )

If anyone has problems with it, email me and I'll try to fix them.

Friday, 21. May 2004, 04:56:48

I was able to just install Opera to my flash drive and change all the paths in Operadef6.ini and opera6.ini to \Opera\<rest of path>, removing the drive letter. Opera works without any problems with this setup.

Monday, 24. May 2004, 05:19:53

Does anyone know when and why Opera needs to access the disk, other than for cache purposes? I've got Opera set up on my stick with XChangeCL and Naranek's technique, which works on all the computers I've tried it on so far, which is only 2k and XP. I set the cache to use the hard disk, and it using the hard disk for cache because the directory I put it in is there and filled with files when Opera's running. Only problem is that Opera still seems to need to use the stick quite often... as in just about every time I load a new webpage, and that makes it hang, particularly when using a machine that uses USB 1.1, so my question is what is Opera doing on the flashdrive, and is there any way I can get it to do it from memory?

Monday, 24. May 2004, 11:31:28

I've noticed this too, and thought maybe it was recording the history file.

Monday, 24. May 2004, 23:40:22

That makes sense. Is there any way to put the history on the hard disk, then clear it on exit?

Tuesday, 25. May 2004, 06:16:17

I found

Direct History File=\opera\profile\opera.dir
Global History File=\opera\profile\global.dat
Viewer History File=\opera\profile\viewers.dat

in Profile\Opera6.ini,

but changing them to a hard disk location simply means that you don't have any history - Opera doesn't make new files at that location. I found that this did cut down a lot of flash disk activity, though there was a write every now and then. I don't know which of the above lines needs to be changed, I did all three at once.

Personally, I don't mind the low disk activity and have decided to keep my history.

Tuesday, 25. May 2004, 08:45:24

For the restore-after-crash functionality Opera keeps track of your UI in \profile\sessions\autosave.win. This will require a write every time one follows a link / opens a new window.

Monday, 5. July 2004, 00:45:54

CarlosTheTackl

avatar

Posts: 6

So, is there no way to get Opera to recognise relative path structures? Do we have to always go through the whole Change-Drive-Letter business?

Monday, 5. July 2004, 05:32:40

CarlosTheTackle:
Your Opera6.ini in your profile directory doesn't need drive letters.

But when I started looking into this project, I was told that the OperaDef6.ini did need drive letters in it. Thus all this messing around.

However, Starfury says that it works fine for him/her when there are no drive letters present in OperaDef6.ini. So maybe Opera is able to cope with relative paths after all.

It should be noted that this project was started with O7.23, so the new versions might be a bit smarter. I haven't bothered testing things with relative paths only as the method I currently use is working fine. If you try it, let us know how it goes.

Monday, 5. July 2004, 05:37:00

CarlosTheTackl

avatar

Posts: 6

I'll give it a go and report back.

Just one question. The instructions here refer to doing a single-user install. I have a done a multi-user install, so I'm wondering what the difference is. Is it better for me to re-install as single-user, or is there only subtle differences between single and multi that can be fixed by messing about in the ini files?

Forums » Opera Community » General Opera topics » Customizing Opera