Novell is now a part of Micro Focus

One Way

Articles and Tips:

Roel Van Bueren

01 Oct 2005


Every day I spend a lot of time using my GroupWise client for e-mail and calendaring and my Web browser to surf the Web. My GroupWise client is very secure and I've customized it to a certain degree. But like most of you, I faced challenges with my Web browser, which was Internet Explorer until I upgraded to another Web browser.

If you attended Laura Chappell's BrainShare 2005 session Spyware, Adware and Keyloggers: Spotting and Eradicating Crappy Traffic, you know what I mean. You have to update Internet Explorer regularly with whatever scary 'critical update' it is now; it's a well-known target for spyware and other digital scum. (For more information, see Laura Chappell's article in this issue, Spyware, Adware, Malware and Other Crappy Network Traffic on p. 10.) Besides that, it misses functionality like tabbed browsing, RSS integration and the ability to customize it to the extent you can customize other browsers.

Now, like so many others, I use Mozilla Firefox, an open source browser, based on Netscape Communicator, which has the huge advantage of being multiplatform. Firefox has become very popular on personal desktops. I can use Firefox on my Windows desktop, my Mac Mini and on my Novell Linux Desktop. After the release of 1.0, Mozilla hopes to capture more than 10 percent of the browser market in 2005; in some countries it has already captured 25 percent of the market.

Besides the fact that it's very popular for personal use because it's easy to use, secure and its usability, Firefox now has become a browser which is suitable to deploy in the enterprise. In this article I'll show how you can deploy Firefox in your enterprise using ZENworks 6.5, Windows Installer technology and AdminStudio ZENworks edition.

First, let's talk about the architecture of Firefox. If you download Firefox from Mozilla, you get the file c:\Install\Firefox Setup 1.0.5.exe, which is a "legacy setup" package. I'll cover that part later. If you install Firefox manually, we can assume several architectural points related to deployment:

  • The default directory for the program files and DLLs of Mozilla Firefox is c:\Program Files\Mozilla Firefox.

  • This directory contains a file called firefox.exe which is the main program file.

  • The directory c:\Program Files\Mozilla Firefox\plugins is being used for integrating various plugins such as Macromedia Shockwave, Macromedia Flash and Apple Quicktime.

    • The profiles.ini file is being stored in c:\Documents and Settings\%USERNAME%\Application Data\Mozilla\Firefox\. This file contains information about one or more available Firefox profiles, their paths, as well as how they should be selected and started.

  • A Firefox profile, which is basically a data directory with different files and subdirectories, contains all browserrelated information:

    • The Bookmarks.html file contains all bookmarks.

    • The Cookies.txt file is the repository for all browser cookies.

    • The History.dat file contains the history of Web sites visited.

    • The Prefs.js JavaScript file contains Firefox settings that can be set by using Firefox, by using About:config within Firefoxbut which can also be altered outside of Firefox. Prefs.js contains settings such as:

      • the browser startup page

      • the location of the browser cache directory

      • the configuration settings of the Firefox download manager which are:

        • the default download directory

        • whether or not a "Save as..." dialog box should be displayed for every download and

        • whether or not the last download directory should be remembered.

      • proxy related settings and

      • extension-related settings

      • The extensions directory contains all installed extensions such as PDF download, SwitchProxy Tool, TabX, googlebar, LinkedIn and, of course, Mozilla for GroupWise.

  • When you start using Firefox, it can ask for the installation of plugins. (See Figure 1.)

Figure 1: When Macromedia Shockwave or Flash plugins aren't installed, Firefox shows an "Install Missing Plugins..." option.

These can be installed from within the browser by using the "Install Missing Plugins" button. But, if you preinstall them, such questions for plugins can be avoided. For example, if you visit www.macromedia.com/shockwave/welcome on a freshly installed Windows computer, you get notified that neither a Macromedia Shockwave Player nor a Macromedia Flash Player is installed.

Now that we know about its architecture, let's look at deployment. We used to use snapshot.exe, but snapshot.exe and the AOT/AXT datastore-type were both invented in an era when a defacto standard for packaging Windows applications wasn't available.

So Novell invented their own packaging method. Only after the Microsoft Office 2000 team invented a new 'open' packaging methodology called Windows Installer, also called MSI, this one became the common and accepted industry standard for Windows applications. There's great value in deploying MSI-based applications. (For more information, see Consistently Consistent in the November/December 2004 issue.)

Novell has supported MSI packages since ZENworks 3.2 and put a lot of new importing-MSI features into ZENworks 6.5. Last year they partnered with Installshield (now MacroVision) to bundle a special edition of AdminStudio with ZENworks 6.5. This edition, called the InstallShield AdminStudio 5.5 ZENworks Edition, has been succeeded by AdminStudio 6.0 ZENworks Edition and can be downloaded from Novell if you have a valid license for ZENworks 6.5. We'll use this version for making our own Firefox MSI.

Figure 2: The InstallShield Repackaging Wizard, which is installed on the Host machine, can be run from within a VMWare Virtual Machine by using the Shared folders option.

This Admin Studio ZENworks edition contains three components:

  • Repackager

  • Tuner

  • Distribution Wizard

We use two of them to deploy Firefox following these steps:

Repackage the Firefox Legacy Setup

It's a good practice to use VMWare for repackaging your legacy setups. If you're not familiar with VMWare, I recommend Rob's Guide to using Vmware by Rob Bastiaansen. Within VMWare you can use a Virtual Machine which has Windows XP Service Pack 2 installed with system components such as Windows Media Player, MAPI, Internet Explorer and DirectX. Of course, it has to be updated with all the latest patches.

Figure 3: This is the result of a captured installation using the Monitor option of the Repackaging Wizard.

Figure 4: With the Tuner, you can make a Transform file in which the Firefox profile directory is configured to either be stored in an iFolder directory or the home directory.

On the host machine you'll have to install AdminStudio 6.0 ZENworks edition. This was released in June 2005 on http://download.novell.com as an upgrade to its 5.5 predecessor. In the c:\Program Files\InstallShield\AdminStudio\6.0\ Repackager\Remote Repackager directory, you'll find setup.exe, which you can run on your host from within the Virtual Machine by using VMWare's shared folders option. If you run this setup, four shortcuts are created on the desktop in your Virtual Machine. These shortcuts are for the corresponding executables on your host.

One of them is the Repackaging Wizard, which has two main options: first, Snapshot does the same as Novell snapshot.exe. It takes a snapshot of your system; you then install your application after which you take another snapshot. The differences between both snapshots, such as installed executables and DLLs, and changed or added registry settings, are then used to create an application package. But there's a second option which is not only faster, but most of the times, more reliable. It's called Installation Monitoring. This one doesn't use snapshot technology, but a more sophisticated way of monitoring lower-level system activities. It's comparable to what utilities like FileMon and RegMon (Sysinternals) do. In this case, we use Installation Monitoring for the beta of Firefox 1.05 which can be downloaded as Firefox Setup 1.0.5.exe.

After the setup has finished, we can create an MSI by loading the result, which is called a Project, into the Repackager. We can select certain files or registry settings to be excluded, which is a huge benefit compared to using and changing AOT/AXT-based application objects in ConsoleOne. Then we Build the MSI by selecting the appropriate menu option.

Create a Transform file for Firefox.msi

Now we have created a base MSI package, it's time to customize this package to our own needs by creating a Transform file (MST). (If you're new to Transform files, you should read Consistently Consistent as mentioned earlier, and Installing Acrobat Reader at the ZENworks Cool Solutions page online at Novell.)

For now, you only need to know that a Transform file is just a delta, or a change file, to the MSI. Everything you want to change in an MSI can be done without changing the MSI by using an MST instead. You then use both during installation; every setting in the MST then prevails the MSI when applicable. This way you don't have to change the MSI. So any patches to the MSI, provided by the vendor, can be installed without any problem.

When you start Firefox for the first time, it looks for the profiles.ini file in the c:\Documents and Settings\%USERNAME%\ApplicationData\Mozilla\Firefox directory. When it doesn't find it there, the user will see an Import Wizard. This wizard enables you to import bookmarks, for example, from Internet Explorer into Firefox and then the profiles.ini file is created.

Because we're talking about enterprise deployment, we probably don't want that. Instead, select System Configuration, INI Files and then click on the Destination Computer in the second column from the left. Then right click and choose to show the AppDataFolder. Then add Profiles.ini underneath it.

The AppDataFolder is the same as c:\Documents and Settings\%USERNAME%. It's best to copy Profiles.ini from another machine where you've already run Firefox. If you look at the Keys of the Profile0 section, you will notice that the Path Key is used for the location of Profile0. Using one profile will usually suffice, but it's wise not to store this profile on a local drive. Either store it in your iFolder or store it in the home directory as I did for this example. That way, you won't lose the profile if you reimage the workstation, for example.

Figure 5: With ConsoleOne you can create a simple application object which starts Firefox. You can make it 'Disconnectable' in order to use this application object in offline mode.

Figure 6: The simple application object 'Firefox' launches Firefox.exe from the 'C:Program FilesFirefox' directory.

You should change two Key Values to do so:

  • Path -> 'H:\data\Firefox'(which tells where to store the profile)

  • IsRelative -> '0'

Now, if you deploy the MSI package with the MST and start Firefox, a default profile will be created in the profile directory. You can run Firefox right away, but Firefox will only use default settings. You can tweak Prefs.js to your owns needs, for example, by configuring a different cache directory, a default startup homepage or customized proxy settings. Below is just an example of what could be changed in Prefs.js:

user_pref("browser.cache.disk.parent_directory", "C:\\WINDOWS\\TEMP");
user_pref("browser.download.dir", "C:\\data\\ifolder\\roel\\Install");
user_pref("browser.download.lastDir", "C:\\Data\\iFolder\\roel\\Data");
user_pref("browser.download.useDownloadDir", false);
user_pref("browser.startup.homepage", "http://www.rovabunetworks.nl");
user_pref("network.proxy.ftp", "proxy.rovabunetworks.nl");
user_pref("network.proxy.ftp_port", 8080);
user_pref("network.proxy.gopher", "proxy.rovabunetworks.nl");
user_pref("network.proxy.gopher_port", 8080);
user_pref("network.proxy.http", "proxy.rovabunetworks.nl");

Figure 7: This application object is an 'Install Only' application object which only installs Firefox by using the MSI package. The application itself is launched by using a 'simple application object' shown at figure 6.

Create ZENworks application objects

Now that we've created an MSI package and an MST file, it's time to deploy them using ZENworks. When it comes to using MSI packages within ZENworks, I usually like to use a two-tier approach. First, create a simple application that, in this case, only runs the executable Firefox.exe. This one then contains all the logic necessary to start it: the necessary Associations, a NAL folder in which the icon should be visible within NAL, Distribution Rules and so on.

Then I create an MSI-based Install Only application that only installs the package with one or more Transform files.

If you then chain these applications using Application Dependencies, it all fits together. Users don't need explicit rights to the MSI-based Install Only application, but it also has several uninstall benefits which I'll discuss later.

If a user executes the simple application object, Firefox, from within the NAL, ZENworks will check whether the dependent applications have been installed. When you now add dependencies for application objects which install Macromedia Flashplayer, Macromedia Shockwave and Apple Quicktime, you will preinstall all necessary components, such as Firefox itself and the plugins which could be used, before Firefox actually gets executed.

Figure 8: Firefox.exe has several application dependencies. These applications will be installed first before ZENworks tries to launch Firefox.exe.

Figure 9: Just put a checkmark before Enable install to be able to uninstall the application, either manually by using NAL or automatically by removing associations.

Upgrade Firefox to a newer version

This article is based on Firefox version 1.05. But, it's easy to migrate to a new version by using the Uninstall feature and the Application dependency features of ZENworks. Of course, you'll first need to create a new MSI package for the new version. Then you can use the Uninstall feature of ZENworks to uninstall the older MSI package.

I always use the Uninstall feature with the Unassociated days to uninstall setting of the Application Launcher, which can be set in ConsoleOne. An application will then be automatically uninstalled when you remove a container or user associations for this application.

The last step is to delete the application dependency between the simple application object for Firefox.exe and the old MSI-based application object and to add a new dependency between Firefox.exe and the new MSI-based application. Next time a user starts or restarts NAL and tries to launch the simple application object for Firefox, ZENworks will first uninstall the older version of Firefox, then install the newer version. Then, last but not least, launch Firefox.exe. And because the Firefox profile isn't part of the uninstall/install process, a user keeps all his Firefox settings, bookmarks, extensions, cookies and so forth.

From now on, you won't have to worry about that "crappy traffic" to which Laura Chappell refers. Your users can have the benefit of RSS feeds and you can also customize your browser almost to your heart's content. Now you can install Firefox throughout your enterprise using Windows installer packages and ZENworks so you can take advantage of the security and robustness of this great open source browser.

Note: A complete set of MSIs discussed in this article can be downloaded from MSIwisdom.

Figure 10: I always use the Uninstall feature with the 'Unassociated days to uninstall' setting of the Application Launcher, which can be set in ConsoleOne.

* Originally published in Novell Connection Magazine


Disclaimer

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.

© Copyright Micro Focus or one of its affiliates