Jump to content

Welcome to MSFN Forum
Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads, give reputation to your fellow members, get your own private messenger, post status updates, manage your profile and so much more. This message will be removed once you have signed in.
Login to Account Create an Account


Photo

Opera classic installer -

- - - - -

  • Please log in to reply
2 replies to this topic

#1
Martin H

Martin H

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 802 posts
  • OS:none specified
I personally preffer Opera storing it's profile data under it's own program folder, instead of in both '%appdata%\Opera\' and '%userprofile\Local Settings\Application Data\Opera\'.

However, only the Opera msi installer features a switch for enabling that during a silent install and i preffer to use the classic installer, as it's smaller, faster and as i'm not really a big fan of msi installers in general(they leave a copy of the installer into '%windir%\Installer\', and they copy the installer into %temp% first, before they unpack it there, and since 'msiexec.exe' still is loaded into memory for a long time after the install has ended...)

The unattended solution i then preffer, is to use 'munge.exe' from the Win2K Resource Kit, to replace the line "Multi User=1" into "Multi User=0" in '%programfiles%\Opera\operadef6.ini' after Opera has been installed.

Then when a new Opera version is released, then it's just a matter of replacing the old installer with the new one and remake the ISO, but if we instead had simply overwritten 'operadef6.ini' with a pre-modified one, then a new pre-modified one would be needed upon each new Opera update, as the Opera installer always overwrites 'operadef6.ini' with a new version...

You'll need 'munge.exe' and a file named 'replace.ini' with the following content :
Windows Registry Editor Version 5.00[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.htm]@="Opera.HTML"[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.html]@="Opera.HTML"[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.mht]@="Opera.HTML"[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.mhtml]@="Opera.HTML"[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.xht]@="Opera.HTML"[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.xhtm]@="Opera.HTML"[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.xhtml]@="Opera.HTML"[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\http]"EditFlags"=hex:02,00,00,00[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\http\shell\open\command]@="\"C:\\Program Files\\Opera\\opera.exe\""[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\http\shell\open\ddeexec]@="\"%1\""[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\http\shell\open\ddeexec\Application]@="Opera"[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\https]"EditFlags"=hex:02,00,00,00[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\https\shell\open\command]@="\"C:\\Program Files\\Opera\\opera.exe\""[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\https\shell\open\ddeexec]@="\"%1\""[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\https\shell\open\ddeexec\Application]@="Opera"[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Opera.HTML]@="HTML Document"[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Opera.HTML\DefaultIcon]@="C:\\Program Files\\Opera\\opera.exe,1"[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Opera.HTML\shell\open\command]@="\"C:\\Program Files\\Opera\\opera.exe\" \"%1\""[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Opera.Image]@="Image"[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Opera.Image\shell\open\command]@="\"C:\\Program Files\\Opera\\opera.exe\" \"%1\""[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet]@="Opera.exe"

Edited by Martin H, 06 September 2008 - 09:24 AM.

/* Moved to Linux - Thanks for a nice stay all! */
Posted Image



How to remove advertisement from MSFN

#2
Martin H

Martin H

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 802 posts
  • OS:none specified
To ditch the extra replace.ini file, then i'm now gone over to using minised.exe instead of munge.exe...

minised is a sed implementation which is about 5 times faster and 70% smaller than the normal sed implementation(GNU sed), so that's why i'm using that version...

Here's the link to the win32 port of minised : http://gnuwin32.sour...ges/minised.htm

Then it's just a matter of :
start /wait Opera_950_classic_Setup.exe /s
minised "s/Multi User=1/Multi User=0/" "%programfiles%\Opera\operadef6.ini" >"%programfiles%\Opera\operadef6.ini.tmp"
move "%programfiles%\Opera\operadef6.ini.tmp" "%programfiles%\Opera\operadef6.ini"
(The '/y' switch of 'move' isn't needed during overwrites when run from a batchfile...)

And the first part of my RunOnceEx.cmd which installs Opera :
@cmdow @ /hid
set key=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
reg add %key%\001 /v 1 /d "%~dpn0\Opera\Opera_950_classic_Setup.exe /s" /f
reg add %key%\001 /v 2 /d "cmd /c @%~dpn0\Opera\minised \"s/Multi User=1/Multi User=0/\" \"%programfiles%\Opera\operadef6.ini\" >\"%programfiles%\Opera\operadef6.ini.tmp\"" /f
reg add %key%\001 /v 3 /d "cmd /c @move \"%programfiles%\Opera\operadef6.ini.tmp\" \"%programfiles%\Opera\operadef6.ini\"" /f
reg add %key%\001 /v 4 /d "xcopy %~dpn0\Opera\profile \"%programfiles%\Opera\" /ehq" /f
reg add %key%\001 /v 5 /d "xcopy %~dpn0\Opera\NPSWF32.dll \"%programfiles%\Opera\program\plugins\" /q" /f
reg add %key%\001 /v 6 /d "regedit /s %~dpn0\Opera\settings.reg" /f
[...]
(I use 'cmd /c' in front of minised, since else redirection to another file isn't possible...)

Edit : I have now changed to using gsar instead of minised, since gsar supports in-file replacements, is a little smaller, and is implemented with a variation of the extremely fast Boyer-Moore search algorithm...

Then it's just a matter of :
start /wait Opera_950_classic_Setup.exe /s
gsar "-sMulti User=1" "-rMulti User=0" -o "%programfiles%\Opera\operadef6.ini"

And the first part of my RunOnceEx.cmd which installs Opera :
@cmdow @ /hid
set key=HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx
reg add %key%\001 /v 1 /d "%~dpn0\Opera\Opera_950_classic_Setup.exe /s" /f
reg add %key%\001 /v 2 /d "%~dpn0\Opera\gsar \"-sMulti User=1\" \"-rMulti User=0\" -o \"%programfiles%\Opera\operadef6.ini\"" /f
reg add %key%\001 /v 3 /d "xcopy %~dpn0\Opera\profile \"%programfiles%\Opera\" /ehq" /f
reg add %key%\001 /v 4 /d "xcopy %~dpn0\Opera\NPSWF32.dll \"%programfiles%\Opera\program\plugins\" /q" /f
reg add %key%\001 /v 5 /d "regedit /s %~dpn0\Opera\settings.reg" /f
[...]

Edited by Martin H, 20 July 2008 - 05:08 PM.

/* Moved to Linux - Thanks for a nice stay all! */
Posted Image


#3
Martin H

Martin H

    Friend of MSFN

  • Member
  • PipPipPipPipPip
  • 802 posts
  • OS:none specified
I have just changed to using INFs instead of CMD/REG-files for installing my apps and regtweaks from RunOnceEx, and so during my investigations of the INF syntax at the MSDN site, then i noticed that there also was a function for making changes to INI-files, so instead of using a third-party utility like GSAR.EXE, then i've made an INF that will change 'Multi User=1' to 'Multi User=0' in operadef6.ini:
[Version]
Signature=$CHICAGO$

[DefaultInstall]
UpdateInis=Opera

[Opera]
"%16422%\Opera\operadef6.ini",System,"Multi User=1","Multi User=0"
You can install the INF by using this command:
RunDll32.exe AdvPack.Dll,LaunchINFSection opera.inf,DefaultInstall

/* Moved to Linux - Thanks for a nice stay all! */
Posted Image





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users



How to remove advertisement from MSFN