System administrators may know, that users of Gecko driven browsers will require fully privileged access to their profile directories. On Windows 2000 and XP, the widely spread Mozilla and Firefox browsers do therefore store their profile data in the user's %AppData% directory. K-Meleon is different! By default, K-Meleon does store its profile data in its program directory. This behaviour is widely accepted in the K-Meleon community, because it empowers users to easily install as much versions or builds of K-Meleon as they want to experiment with. On the other hand, system administrators are forced to make a few extra steps to set up K-Meleon on a multi-user system. To make K-Meleon store its profile data in the user's %AppData% directory, you have to run the K-Meleon executable (k-meleon.exe) with the command line option "-profilesDir $appdata" every time.
Following, I want to describe the steps to get a working multi-user setup. I expect Internet Explorer to be your default browser.
First, of course, you have to install K-Meleon. Keep to the following guidelines:
Second, you have to adjust K-Meleon's start menu shortcut by adding the command line option "-profilesDir $appdata" to e.g. "%ProgramFiles%\K-Meleon\k-meleon.exe -profilesDir $appdata". Move the shortcut to the start menu that is common to all users.
Third, you have to set K-Meleon as your system's or your users' default browser. K-Meleon itself (i.e. SetDefault.exe) won't do it the way you need it. You have to manipulate the Windows Registry yourself. To your convenience, you can make use of the following sample files. Note, that they only demonstrate the basics. Less experienced users will find additional explanations at the bottom of this page.
As administrator you have to aplly the following .reg file to get rid of Internet Explorer's DDE keys:
Windows Registry Editor Version 5.00
; Delete MSIE's Direct Data Exchange keys
[-HKEY_LOCAL_MACHINE\Software\Classes\htmlfile\shell\open\ddeexec]
[-HKEY_LOCAL_MACHINE\Software\Classes\http\shell\open\ddeexec]
[-HKEY_LOCAL_MACHINE\Software\Classes\https\shell\open\ddeexec]
[-HKEY_LOCAL_MACHINE\Software\Classes\ftp\shell\open\ddeexec]
After having applied the .reg file above, there are several alternative ways to go on:
This way demonstrates, how to set K-Meleon as your system's default browser.
Run the following .js file (JScript):
// K-Meleon as default browser (basic setup)
// Startup script (has to be run once)
// Make sure the path is matching to your system!
// (you can use environment variables here)
var key = new Array();
var shl = new ActiveXObject("WScript.Shell");
var val = "\"%ProgramFiles%\\K-Meleon\\k-meleon.exe\" -profilesDir $appdata \"%1\"";
key[0] = "HKLM\\Software\\Classes\\htmlfile\\shell\\";
key[1] = "HKLM\\Software\\Classes\\http\\shell\\";
key[2] = "HKLM\\Software\\Classes\\https\\shell\\";
key[3] = "HKLM\\Software\\Classes\\ftp\\shell\\";
for (var i in key) try {
shl.RegWrite(key[i]+"open\\command\\",shl.RegRead(key[i]+"open\\command\\"),"REG_EXPAND_SZ");
} catch(e) {
WScript.Echo("Setup failed!");
WScript.Quit();
}
for (var i in key) shl.RegWrite(key[i]+"open\\command\\",val,"REG_EXPAND_SZ");
shl.RegWrite(key[0],"open","REG_SZ");
shl.RegWrite(key[0]+"open\\","Open with K-Meleon","REG_SZ");
shl.RegWrite(key[0]+"opennew\\","Open with Internet Explorer","REG_SZ");
Under certain circumstances, (some of) the addressed registry keys may be locked (i.e. in use by another application) and can not be changed. The script above takes care of that, to avoid a broken setup. When you get an error message saying "Setup failed!", you can try it under another administrative account (best your system's default account). Or you can set up this script as a startup script in your system's Group Policy (GPEdit.msc) and reboot your machine.
This way demonstrates, how to set K-Meleon as default browser for all of your users.
Set up the following .js file (JScript) as a logon script in your system's Group Policy (GPEdit.msc). This will migrate your users automatically to K-Meleon when they logon next time (no reboot required):
// K-Meleon as default browser (basic setup)
// Logon script (has to be run once per user)
// Make sure the path is matching to your system!
// (you can use environment variables here)
var key = new Array();
var shl = new ActiveXObject("WScript.Shell");
var val = "\"%ProgramFiles%\\K-Meleon\\k-meleon.exe\" -profilesDir $appdata \"%1\"";
key[0] = "HKCU\\Software\\Classes\\http\\shell\\";
key[1] = "HKCU\\Software\\Classes\\https\\shell\\";
key[2] = "HKCU\\Software\\Classes\\htmlfile\\shell\\";
key[3] = "HKCU\\Software\\Classes\\ftp\\shell\\";
for (var i in key) shl.RegWrite(key[i]+"open\\command\\",val,"REG_EXPAND_SZ");
shl.RegWrite(key[2],"open","REG_SZ");
shl.RegWrite(key[2]+"open\\","Open with K-Meleon","REG_SZ");
shl.RegWrite(key[2]+"opennew\\","Open with Internet Explorer","REG_SZ");
This way demonstrates, how to set different default browsers for different users.
Those of your users, who want to keep Internet Explorer as their default browser, have to apply the following .reg file:
Windows Registry Editor Version 5.00
; Restore MSIE's Direct Data Exchange keys for the current user
; Open local HTML documents with MSIE
[HKEY_CURRENT_USER\SOFTWARE\Classes\htmlfile\shell]
@=-
[HKEY_CURRENT_USER\SOFTWARE\Classes\htmlfile\shell\open]
@=-
[-HKEY_CURRENT_USER\Software\Classes\htmlfile\shell\opennew]
[-HKEY_CURRENT_USER\Software\Classes\htmlfile\shell\open\command]
[HKEY_CURRENT_USER\SOFTWARE\Classes\htmlfile\shell\open\ddeexec]
@="\"file://%1\",,-1,,,,,"
"NoActivateHandler"=""
[HKEY_CURRENT_USER\SOFTWARE\Classes\htmlfile\shell\open\ddeexec\Application]
@="IExplore"
[HKEY_CURRENT_USER\SOFTWARE\Classes\htmlfile\shell\open\ddeexec\Topic]
@="WWW_OpenURL"
; Open http:// addresses with MSIE
[-HKEY_CURRENT_USER\Software\Classes\http\shell\open\command]
[HKEY_CURRENT_USER\Software\Classes\http\shell\open\ddeexec]
@="\"%1\",,-1,0,,,,"
"NoActivateHandler"=""
[HKEY_CURRENT_USER\Software\Classes\http\shell\open\ddeexec\Application]
@="IExplore"
[HKEY_CURRENT_USER\Software\Classes\http\shell\open\ddeexec\Topic]
@="WWW_OpenURL"
; Open https:// addresses with MSIE
[-HKEY_CURRENT_USER\Software\Classes\https\shell\open\command]
[HKEY_CURRENT_USER\Software\Classes\https\shell\open\ddeexec]
@="\"%1\",,-1,0,,,,"
"NoActivateHandler"=""
[HKEY_CURRENT_USER\Software\Classes\https\shell\open\ddeexec\Application]
@="IExplore"
[HKEY_CURRENT_USER\Software\Classes\https\shell\open\ddeexec\Topic]
@="WWW_OpenURL"
; Open ftp:// addresses with MSIE
[-HKEY_CURRENT_USER\Software\Classes\ftp\shell\open\command]
[HKEY_CURRENT_USER\Software\Classes\ftp\shell\open\ddeexec]
@="\"%1\",,-1,0,,,,"
"NoActivateHandler"=""
[HKEY_CURRENT_USER\Software\Classes\ftp\shell\open\ddeexec\Application]
@="IExplore"
[HKEY_CURRENT_USER\Software\Classes\ftp\shell\open\ddeexec\ifExec]
@="*"
[HKEY_CURRENT_USER\Software\Classes\ftp\shell\open\ddeexec\Topic]
@="WWW_OpenURL"
Those of your users, who want to have K-Meleon as their default browser, have to apply the following .reg file:
Windows Registry Editor Version 5.00
; K-Meleon as default browser (basic setup)
; Make sure the path is matching to your system!
; Open local HTML documents with K-Meleon
[HKEY_CURRENT_USER\Software\Classes\htmlfile\shell]
@="open"
[HKEY_CURRENT_USER\Software\Classes\htmlfile\shell\open]
@="Open with K-Meleon"
[HKEY_CURRENT_USER\Software\Classes\htmlfile\shell\opennew]
@="Open with Internet Explorer"
[HKEY_CURRENT_USER\Software\Classes\htmlfile\shell\open\command]
@="\"C:\\Program Files\\K-Meleon\\k-meleon.exe\" -profilesDir $appdata \"%1\""
[-HKEY_CURRENT_USER\Software\Classes\htmlfile\shell\open\ddeexec]
; Open http:// addresses with K-Meleon
[HKEY_CURRENT_USER\Software\Classes\http\shell\open\command]
@="\"C:\\Program Files\\K-Meleon\\k-meleon.exe\" -profilesDir $appdata \"%1\""
[-HKEY_CURRENT_USER\Software\Classes\http\shell\open\ddeexec]
; Open https:// addresses with K-Meleon
[HKEY_CURRENT_USER\Software\Classes\https\shell\open\command]
@="\"C:\\Program Files\\K-Meleon\\k-meleon.exe\" -profilesDir $appdata \"%1\""
[-HKEY_CURRENT_USER\Software\Classes\https\shell\open\ddeexec]
; Open ftp:// addresses with K-Meleon
[HKEY_CURRENT_USER\Software\Classes\ftp\shell\open\command]
@="\"C:\\Program Files\\K-Meleon\\k-meleon.exe\" -profilesDir $appdata \"%1\""
[-HKEY_CURRENT_USER\Software\Classes\ftp\shell\open\ddeexec]
You can set arbitrary applications as default browser in an analogous manner. Simply make the command lines and application names in the previous sample file fit your needs.
Finally, you have to ensure, that your privileged users (or you yourself) do not mess up the multi-user setup again. Therefore, delete SetDefault.exe in K-Meleon's program directory. This will make K-Meleon's menu option "Set As Default Browser..." ineffectual.
I don't want to conceal, that this multi-user setup has a few disadvantages. One is related to K-Meleon's loader. This application is not able to preload the browser with the command line option that is required here. You can not use it. Another one is related to the Aggreg8 RSS reader built into K-Meleon 0.9. All users will share the same list of RSS news feeds and only privileged users will be able to modify this list. Have a look at my adapted Aggreg8 extension for a workaround.
An environment variable that stores the path of the current users's directory for application related data (e.g. C:\Documents and Settings\%UserName%\Application Data). Depending on your system's installation and localization, the drive letter and the directory names may be different.
%UserName% is another environment variable, that stores the name of the current user.
An environment variable that stores the path of the system's default directory for program files (e.g. C:\Program Files). Depending on your system's installation and localization, the drive letter and the directory name may be different.
These files contain JavaScript (ECMA Script) or JScript (Microsoft) source code. To create a new .js file, simply create a new text file and change the file extension from "txt" to "js". To execute such a file, simply double click the file. To edit such a file, right click the file and choose "Edit". These files contain plain text. You can open and edit these files with any text editor you like.
JavaScript is an open script language, that is designed to be used on web pages and that is supported by all modern browsers. It can not harm your system - provided that your browser's JavaScript implementation is secure (i.e. your browser does not have any security leaks).
Microsoft's JScript is a proprietary script language (like VBScript), that can be used on web pages like JavaScript, but that is only supported by Internet Explorer. In conjunction with Microsoft's Windows Script Host (WScript.exe and CScript.exe), JScript is very powerfull. Windows Scripts (.js, .jse, .vbs, .vbe, .wsf) can do nearly everything a program can do. So, do not run script files from doubtfull sources (e.g. email attachements). Deal with them as carefully as with executables (.exe, .com, .pif).
Tip: Use Control Panel\Folder Options' File Types panel to change the default action for script files from "open" to "edit". When you accidentially double click a script file, it will then not be executed but displayed with Notepad. When you want to execute a script file, you will have to right click it and explicitly choose "Open".
This file format is used by the Windows Registry Editor (RegEdit.exe) to import/export registry data. To create a new .reg file, simply create a new text file and change the file extension from "txt" to "reg". To apply the settings stored in such a file, simply double click the file. To edit such a file, right click the file and choose "Edit". These files contain plain text. You can open and edit these files with any text editor you like.
The Group Policy Editor, a Microsoft Management Console snapin. Not part of Windows XP Home!
A script or batch file, that is executed whenever a user logs on to your system (no matter who it is). It is executed with the privileges of the user who is logging on. To set up a logon script, open the Group Policy Editor (GPEdit.msc) and select:
User Configuration\Windows Settings\Scripts (Logon/Logoff)\Logon
Make sure, that all users are able to access (read) the file!
A script or batch file, that is executed whenever your system starts up. It is executed with system privileges before the logon screen appears. To set up a startup script, open the Group Policy Editor (GPEdit.msc) and select:
Computer Configuration\Windows Settings\Scripts (Startup/Shutdown)\Startup