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 :
CODE
"Multi User=1" "Multi User=0"
Then it's just a matter of :
CODE
start /wait Opera_950_classic_Setup.exe /s
munge replace.ini -t "%programfiles%\Opera\operadef6.ini"
munge replace.ini -t "%programfiles%\Opera\operadef6.ini"
Here is the first bit of my RunOnceEx.cmd which installs Opera :
CODE
@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\munge %~dpn0\Opera\replace.ini -t \"%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
[...]
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\munge %~dpn0\Opera\replace.ini -t \"%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
[...]
I then have an Opera folder in '\$OEM$\RunOnceEx\' which includes the Opera classic installer, the munge.exe tool with it's replace.ini file, the flash player plugin(NPSWF32.dll), a reg-file with the reg-entries Opera sets upon second startup, when selecting 'OK' to make it the default browser(settings.reg), and then finally a subfolder named 'profile' which stores my Opera settings i.e. the 'profile' and 'mail' folders...
I use 'xcopy' instead of 'copy', because it by default removes the read-only attributes, which is convenient when copying from a CD on Win2k systems, as then an extra 'attrib' command isn't needed afterwards.
I personally preffer to not have a progress-window shown during the RunOnceEx install stage and just have the apps installed completely silent, so i then dosen't add any "description" fields in the RunOnceEx.cmd code and then the progress window isn't shown...
settings.reg :
CODE
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"