snAppShot Tricks for Internet Explorer 4.0
Novell Cool Solutions: Tip
Digg This -
Posted: 4 May 1999
After some very intensive testing in our secret underground testing labs, we have concluded that the Microsoft Internet Explorer 4.0 installation is doing a few weird and funky things that the great snAppShot tool doesn't understand (a conclusion that many of you out there in network land have also made).
This week's Tip reviews a few macro basics (and how snAppShot works with macros), illustrates the technical problem (if you're interested), and shows you how to solve things by modifying the Application object or the .axt file.
A Special Macros Primer
Before we describe the problem, and the solution, bear with us as we review a few basics about a very powerful aspect of Application Launcher: Special Macros.
"Special Macros" are a number of cool built-in machine- and user-specific values that snAppShot and Application Launcher uses.
Shameless Plug: The online Help that appears when you click the Help button on the Application object Macros property page in NWAdmin gives a detailed list and additional explanations.
By reading Special Macros from the Registry, snAppShot and Application Launcher let you customize Application objects so you can distribute the same application to machines that might have Windows installed or configured with different drives and directories.
Here is a list and description of a few Special Macros:
|*WinDir||Windows directory, typically c:windows or c:winnt|
|*WinSysDir||Windows system directory, typically c:\windows\system or c:\winnt\system32|
|*WinDisk||Drive letter (plus colon) for Windows directory, typically c:|
|*WinSysDisk||Drive letter (plus colon) for Windows system directory c:|
|*WinSys16Dir||Windows NT 16-bit system directory (c:\winnt\system)|
|*TempDir||Windows temporary directory (c:\windows\temp)|
|*Favorites||File system directory that serves as a common repository for the user's favorite items. Typically this directory is c:\windows\favorites or c:\winnt\profiles\administratorfavorites.|
|*Fonts||Virtual folder containing fonts. Typically c:\windows\fonts or c:\winnt\fonts.|
|*NetHood||File system directory containing objects that appear in the network neighborhood. Typically c:\windows\nethood or c:\winnt\profiles\administrator\nethood.|
|*PrintHood||File system directory that serves as a common repository for printer links. Typically c:\winnt\profiles\administrator\printhood. Only used by Windows NT 4.|
|*Personal||File system directory that serves as a common repository for documents. Typically c:\myfiles or c:\winnt\profiles\administrator\personal.|
How snAppShot Uses Special Macros
Now let's talk more specifically about how snAppShot uses Special Macros and how it adds them to the .aot file.
When snAppShot starts (or re-starts after a re-boot), it asks the Application Launcher client library for a list of the "Special Macros." This list is combined with the "User Macros" (in Custom Mode you can edit and add as many as necessary) to make a complete list of macros, which are then ordered longest value to shortest value. This ordering results in the most complete substitution, that is, snAppShot searches and replaces C:\Windows\Program Files\Netscape before it searches and replaces C:\Windows. As snAppShot zips along, it records the differences between the pre-installation scan and the second (or post-installation) scan. It then creates an entry in the .aot file, and, as part of creating this entry, snAppShot calls the routine that searches and replaces data with the macros name. In short, this is how the .aot file and later the Application object get the macro values.
Still with us? Now we need to explain how the Application Launcher Client library gets the values and the names for these Special Macros. It looks in the Registry under the key:
. . . and for each of the entries the Application Launcher client creates a Special Macro using the name and value. If the value does not exist then the Special Macro is returned and the data value is set to blank.
Which brings us to, shall we say, an oversight in snAppShot (which will soon be corrected). Internet Explorer 4.0 is adding and creating new values for three of the Special Macros under the following key:
These correspond to the the Application Launcher Special Macros:
Thus, when snAppShot adds the [Registry Value Create ] info in the .AOT or AXT file it writes entries that look like:
[Registry Value Create]
[Registry Value Create]
[Registry Value Create]
Chicken or the Egg?
When the Application Launcher client tries to distribute these two settings, it sees the %*FAVORITES% macro value and, in an attempt to set this Registry key, tries to read the value from this exact Registry key. See the problem? In essence, Application Launcher is trying to use data from the very same Registry key that it is trying to create.
Two Ways to Skin a Chicken
This Application distribution would work just great if the Registry value was set before the application was distributed.
One way of solving this is to set this Registry value before the user clicks on the icon (perhaps using Z.E.N.works Workstation policies). Then, when the Application Launcher client reads the data for these special macros, it reads the correct value and knows how to replace %*Favorites% for all of the copy file entries. You could also remove the three [Registry Value Create] entries that add the *FAVORITES, *PERSONAL, and *APPDATA macro values from the Application object.
A better solution is to edit the Application object, either by editing an .axt version of the Application object (before it's created), or search and replace the necessary data on an existing Application object (see the NWAdmin Tool menu). In any event, you need to do the following:
1. Search for %*FAVORITES% and replace it with a different macro like %MYFAVORITES%
2. Search for %*PERSONAL% and replace it with a different macro like %MYPERSONAL%
3. Search for %*APPDATA% and replace it with a different macro like %MYAPPDATA%
The next step is to add the definition for these three new macros to the Application object's Macros property page, or to the top of the .axt file. Notice that because Windows NT and Windows 95 differ a little bit with regard to users, you will need to create different entries for each platform. Here are three example: Three for Windows 95 and three for Windows NT:
For Windows NT, add macro entries that looks like these:
For Windows 95, add macro entries that look like these:
If you're partial to a GUI interface, you can also add these two values to the Application object on the Macros property page. The result is the same.
There you have it! With these few simple changes you should be able to snAppShot IE 4.0, tweak the .axt file, and then distribute it just like all the other applications in your Z.E.N.works environment. In the meantime, we'll clean things up a bit and make snAppShot even smarter.
I suggest you gather that family together, find the nearest chicken dining establishment, and celebrate!
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com