Distributing Netscape Navigator Using Novell's ZENworks
Articles and Tips: article
Engineer, CNE, ASE
Novell Support Forum SysOp
01 Feb 1999
Special thanks to my fellow SysOps, especially Marcus Williamson, for their help in writing this AppNote.
ZENworks makes it easy to distribute applications over the network. But with some applications, such as Netscape Navigator/Communicator, there are a few tricks you need to know to allow each user to access a personalized setup.
Novell's ZENworks has enjoyed great success as an efficient way to distribute and manage applications in a network environment. Using the snAppShot utility that comes with ZENworks, the network administrator can create a template file that contains all of the modifications that must occur at the workstation in order to run a given application (executable files, Windows registry entries, *.INI files, and so on). From this template an Application object is created in Novell Directory Services (NDS) which is a logical representation of the application. Users, groups, or containers can be associated with the Application object to determine who can access and run the application.
Although the snAppShot utility can easily detect the changes made by most application installations, some applications are a bit trickier to work with. For example, Netscape Navigator/Communicator is different because it relies on a Java script file and several DLLs for its user preferences. However, you can still use ZENworks to distribute personalized copies of Netscape Navigator by following the procedure outlined in this AppNote.
After briefly explaining the oddities in Netscape Navigator, this AppNote provides guidelines for running the snAppShot utility for the Netscape browser versions 4.04, 4.06, or 4.5. It then explains how to tweak the Application object in the NetWare Administrator (NWAdmin) utility to customize the application for network users.
It is assumed that the reader has some familiarity with ZENworks and particularly the Novell Application Launcher (NAL) feature. For a good tutorial, see the document entitled "Guide to NAL 2.01" available on the Web at:
http://support.novell.com/forums/ucflinker.htm. Look for 'nalguide.zip'.
While some of the examples in the AppNote assume a Swedish Netscape Navigator (hence the strange directory names), the techniques apply to any language version of Netscape version 4.x. For simplicity, we'll use "Netscape Navigator" to mean either Navigator or Communicator.
Netscape Navigator Oddities
Typically, the PREF.JS file is located in C:\Program Files\Netscape\Users\username. Since this location is machine-dependent, it does not lend itself well to roaming profiles.
The PREFS.JS file is made up of a number of lines of the form:
Netscape scans this file from top to bottom. It appears that you do not even have to remove or change existing lines. You can simply add new lines at the end of the file to override settings made in previous lines.
Netscape has four DLLs that are used when the user changes the preferences:
To find these DLLs, Netscape looks into the registry at the following key:
Apparently, the snAppShot utility does not always pick these up. The actual CLSID (Class ID) values change from installation to installation, but the DLLs are easy to find by opening the registry and looking for the filenames indicated above. (Note that XPPREF32.DLL does not always have a registry entry.)
This information can be used in a creative fashion. For example, if you remove the links to these DLLs, you effectively prevent users from changing the default preference settings.
Taking a Snapshot of Netscape with snAppShot
To obtain a template file of the changes Netscape Navigator makes when it is installed, you start the snAppShot utility on a workstation and then run the Netscape setup program. The steps below for doing this assume the following:
A network installation of Netscape exists in F:\Program\Netscape
A local cache is placed in C:\Netscape\Cache
The user's personal directory and settings are under P:\Netscape.
Here is the general procedure to follow.
Start snAppShot on a workstation, and follow the onscreen prompts to name the Application object, icon title, and so on. When prompted, run the Netscape Navigator install program and specify F:\Program\Netscapeas the installation directory. Place the snAppShot directory on a local drive, as snAppShot sometimes has problems writing to a network drive.
After Netscape is installed, do not continue with snAppShot just yet. Instead launch Netscape, as we need to capture the changes its Profile Manager makes to the registry. When you start Netscape, you will see the Profile Manager window shown in Figure 1. The listbox will initially be empty. Click on New to create a new user profile.
Figure 1: Through user profiles, Netscape allows multiple users to share one copy of the application.
In the window shown in Figure 2, name the profile "default" and provide a dummy e-mail address (you will use NAL to change it later). Click on Next to continue.
Figure 2: Enter the name "default" and provide a dummy e-mail address.
In the next window (see Figure 3), tell Netscape to create the profile in the P:\Netscape\Users\defaultdirectory.Click on Finish.
Figure 3: Specify that the user profile be created in the P:\Netscape\Users\ default directory.
The user profile you just created will now exist on every workstation that runs Netscape from the Application Launcher. Since the path points to the P drive, Netscape will take its settings from whichever user is logged in.
At this point you can also enter all settings you want to be global (that is, static defaults for all users). These settings can be overridden later with NAL.
After you have finished the Netscape install, continue with snAppShot. The files created by snAppShot can then be copied to F:\Program\Netscape. When snAppShot is finished, you use the resulting Application object template (AOT) file to create an Application object in NWAdmin.
Tweaking the Netscape Application Object
The created Application object will need some tweaking, which is described below, tab by tab.
Enter an Icon title, specify an Icon, and set the Path to Executable as:
Windows 95 and Windows NT
Working Directory is set to P:\
If you are concerned about security, you could edit the termination script and add a call to a batch file that deletes the local cache directory upon termination.
Source and target path are both set to F:\Program\Netscape.
The important settings here are the paths to the preferences DLLs. Look for registry entries under HKEY_CLASSES_ROOT, as described earlier in this AppNote. There should be four of them, one for each DLL. If one or more is missing, proceed as follows.
Start REGEDIT. Do a search for BRPREF. When located, export that part of the registry into a file on a suitable drive. Repeat for the rest of the missing DLLs. Name the files REGEDIT1, 2, 3, and 4. They should look like the following (note that the path is not always present):
Import these four files into NWAdmin (File, Import, Registry files).
Other important registry entries are found under HKEY_LOCAL_MACHINE/ Software/Netscape/Netscape Navigator/Users/default. Make sure the DirRoot entry points to drive P and add the EmailAddr and UserName variables, as shown in Figure 4.
Figure 4: On the Registry Settings page you can specify values for various registry entries.
For all names, check the "Track distribution per user" option. When ZENworks installs an application on a computer, it writes a magic number (the GUID) into the registry, together with the version number you have entered under "Distribution". It uses this information to check whether the application has been installed and if the installed copy is the latest version. This normally happens once per computer. If you have several users and each has their own personalized settings, you must activate "Track distribution per user" for those settings that are unique for each user.
The "Distribute always" option simply pushes down the setting every time the program is launched. You can check this option if you want.
Netscape 4.04 needs only a few local files: IMAGEHLP.DLL, MSVCIRT.DLL, MSVCRT.DLL, and MC42.DLL (see Figure 5). Note that several options are available to control how these files are copied (copy always, copy if newer version, and so on).
If you have a later version of Netscape, there are also a few additional files needed for multimedia support. The rest of the locally copied files can be safely omitted.
Figure 5: On the Application Files page you can specify which files to copy to the workstation.
Here you also create the local cache directory, the P:\Netscape\Users\ defaultdirectory, and a default location for downloaded files. You will also copy in a skeleton PREF.JS file such as the one shown below.
In this skeleton file you put everything that is static information. The example file below assumes a BorderManager proxy server at address 10.0.1.2.
// Netscape User Preferences // This is a generated file! Do not edit. user_pref("browser.cache.directory", "C:\\Netscape\\Cache"); user_pref("browser.download_directory", "P:\\Default\\"); user_pref("browser.cache.disk_cache_size", 5000); user_pref("browser.link_expiration", 30); user_pref("browser.startup.homepage", "http://www.rox.aland.fi/"); user_pref("browser.startup.homepage_override", false); user_pref("browser.url_history.URL_1", "http://home.netscape.com/"); user_pref("custtoolbar.personal_toolbar_folder", "Personal Toolbar Folder"); user_pref("ldapList.version", 1); user_pref("ldap_1.directory1.filename", "abook.nab"); user_pref("ldap_1.directory2.filename", "XVT1MF0S.nab"); user_pref("ldap_1.directory3.filename", "X0V61JRA.nab"); user_pref("ldap_1.directory3.searchBase", "c=US"); user_pref("ldap_1.directory4.filename", "XUHJ6H3G.nab"); user_pref("ldap_1.directory5.filename", "X0TJ5OGA.nab"); user_pref("ldap_1.directory6.filename", "X1NVN6DQ.nab"); user_pref("ldap_1.end_of_directories", "12293024"); user_pref("mail.max_size", 0); user_pref("mail.use_exchange", false); user_pref("network.hosts.nntp_server", "news.rox.aland.fi"); user_pref("network.hosts.pop_server", "mail.pop.aland.fi"); user_pref("network.hosts.smtp_server", "mail.out.aland.fi"); user_pref("network.hosts.socks_conf", "c:\\windows\\socks.cnf"); user_pref("network.tcpbufsize", 32768); user_pref("news.max_articles", 100); user_pref("news.show_pretty_names", true); user_pref("news.sort_by", 0); user_pref("security.enable_java", false); user_pref("security.password_lifetime", 10); user_pref("taskbar.x", 634); user_pref("taskbar.y", 8); user_pref("network.proxy.http", "10.0.1.2"); user_pref("network.proxy.http_port", 8080); user_pref("network.proxy.no_proxies_on", "127.0.0.1,localhost"); user_pref("network.proxy.type", 1);
PREFS.JS is also the place to set up Netscape so that it calls GroupWise (or any other MAPI-compliant mail system) for e-mail functions. This is done by adding these lines to the PREFS.JS file:
user_pref("mail.use_altmail", true); user_pref("mail.use_altmail_for_news", false); // 4.05 up user_pref("mail.altmail_dll", "navmapi32.dll");
The NAVMAPI32.DLL file ships with Netscape 4.04. If you don't have this file, you will need to obtain it from Netscape or some other source. For more information, see TID 2940055 in the Novell Technical Support Knowledgebase (http://support.novell.com) and article #971223-1 in the Netscape Knowledgebase (http://help.netscape.com).
Note: It appears that with Netscape 4.04, this procedure will not work unless you rename navmapi32.dll to postal32.dll.
Although the general text file handling function in ZENworks is designed to edit files such as AUTOEXEC.BAT and CONFIG.SYS, it can also be used to modify the skeleton PREFS.JS file, as shown in Figure 6.
Figure 6: On the Text Files page you can edit the skeleton PREF.JS file.
All settings here should be "Track distribution per user".
Icons and Shortcuts
If desired, all icons can be deleted here if you use NAL Explorer to put the icons on the desktop, menu, or system tray. You can also create a "semi-static" icon (one that is always present, but launches the application through NAL). To do this, specify the shortcut to run Z:\public\nal.exe with the "/a" option followed by the fully distinguished name of the Application object. For example:
Z:\public\nal.exe /a .appobj.o.ou
The expression "semistatic" simply means that the icon will always be present on the user's desktop, but instead of pointing directly to the executable, it starts the application "through" NAL (that is, it will check for new versions, honor the "Track distribution per user" setting, and so on).
For further study, a sample AOT file for Netscape Navigator is available to download at http://www.novell.com/coolsolutions/tools/index.html. You can use the AOT to AXT converter available at the Novell Consulting Web site to convert it into an AXT file. The AXT file is a text-format representation of the AOT, much like an INI file that can be edited. (Future versions of ZENworks will have the ability to write AXT files directly.) The AOT to AXT converter utility is part of the ZENworks Application Management (NAL) Tool Kit which can be found at http://support.novell.com/forums/ucflinker.htm. Look for 'nalguide.zip'.
Locking the Netscape Settings
Using ZENworks to distribute Netscape Navigator in the way outlined in this AppNote provides many benefits. The initial rollout can happen faster, and subsequent updates are easily made. Changes in settings such as proxy server address can also be pushed out if needed, without someone having to visit every desktop. Finally, integrating the application settings with NDS means that the users do not have to enter information such as e-mail addresses manually, thus eliminating a possible source of error.
To learn more about how the PREFS.JS file works, study the relevant information on the following Netscape Web site:
I have also found the FileMon and RegMon tools to be of great help in figuring out the interaction between applications, their files, and their registry settings. These are available at:
The origin of this information may be internal or external to Novell. While Novell makes all reasonable efforts to verify this information, Novell does not make explicit or implied claims to its validity.