Novell Home

Deliver IE5.x via ZENworks with NAL 3 as Windows 95 Shell

Novell Cool Solutions: Trench
By Karl Allen Swelling

Digg This - Slashdot This

Posted: 8 Nov 2000
 

The following is from TID # 10019287:


Symptom

Internet Explorer 5 fails after reboot when SETUP is executed as a NAL application object NAL 3.0 set as the workstation shell on a WIN95 workstation.

Cause

Internet Explorer depends upon Explorer being the workstation shell.

Fix

Windows Explorer needs to be the shell in order for Internet Explorer's SETUP to run properly. This is as designed by Microsoft.


Well, this is not exactly true. The problem is that only Windows Explorer processes what is in the HKLM\SOFTWARE\Microsoft\Windows\ CurrentVersion\Run and HKLM\SOFTWARE\Microsoft\Windows\ CurrentVersion\RunOnce registry keys. When NAL is the shell, these keys are never processed, so the after-reboot part of the Internet Explorer installation (and other application installations that use the RunOnce key, like MDAC) is never performed.

First, let's take a look at part of my first application object:

AXT_FILE 3.0

[Application Name]
Value=MSINTERNETEXPLORER55-APP5

[Application Caption]
Value=Internet Explorer 5.5

[Registry Value Create]
Type=String
Flag=Write Always
Key=HKEY_LOCAL_MACHINE\SOFTWARE\Swelling
Name=AppMSIE
Value=5.5

[Registry Key Delete]
Key=HKEY_LOCAL_MACHINE\SOFTWARE\Swelling\AppMSIEPlugins

[Filter Disk]
Drive=C:
Value=100
Flag=Greater Than
Flag=Show Always

[Filter OS Version]
Type=Windows 95
Major Version=-1
Minor Version=-1
Revision Version=-1

[Application PostDistribution Script]
File=PODS.TXT

[Application Association Flags]
Flag=Launcher
Flag=Start Menu
Flag=Desktop

[Application Path]
Value=C:\Program Files\Internet Explorer\IEXPLORE.EXE

[Application Platform]
Flag=Windows 95

[Application Flags]
Flag=Always Prompt Reboot

* PODS.TXT contains the following:
#K:\MSIE5\WIN32\EN\IE5SETUP.EXE /R:N
EXIT

This application object installs and then runs Internet Explorer. First it sets the HKLM\SOFTWARE\Swelling\AppMSIE[5.5] key (which will be important later), runs "K:\MSIE5\WIN32\EN\IE5SETUP.EXE /R:N" without rebooting, and then allows NAL to prompt for a reboot. If this was really everything that had to be installed, then you could just click on the icon again after the reboot and Internet Explorer would start. That takes us to my next application object:

AXT_FILE 3.0

[Application Name]
Value=HKLMSMWCVRO-CFG2

[Macro]
Name=SOURCE_PATH
Value=Z:\PUBLIC

[Macro]
Name=TARGET_PATH
Value=C:\NOVELL\SWELLING

[Application Caption]
Value=HKLM S M W CV RO

[Directory Create]
Flag=Write Always
Directory=%TARGET_PATH%

[File Copy]
Flag=Update Create
Flag=Always Distribute Setting
Source=%SOURCE_PATH%\NALFILES\ZEN\ WINBATCH\SRUNONCE.EXE
Target=%TARGET_PATH%\SRUNONCE.EXE

[File Copy]
Flag=Update Create
Flag=Always Distribute Setting
Source=%SOURCE_PATH%\NALFILES\ZEN\ WINBATCH\WBDBT32I.DLL Target=%TARGET_PATH%\WBDBT32I.DLL

[Filter OS Version]
Type=Windows 95
Major Version=-1
Minor Version=-1
Revision Version=-1

[Filter Registry Data]
Type=Binary
Key=HKEY_LOCAL_MACHINE\SOFTWARE\Swelling
Value=WSState
Length=4
Data=4C 6F 63 6B
Flag=Equals

[Application Association Flags]
Flag=Force Run

[Application Icon Order]
Value=11

[Application Path]
Value=%TARGET_PATH%\SRUNONCE.EXE

[Application Platform]
Flag=Windows 95

[Application Flags]
Flag=Do not Cleanup Resources
Flag=Never Prompt Reboot
Flag=No Distribution Window
Flag=Launch Hidden
Flag=Force Run Wait

This is the application object at the heart of the solution. Essentially, this application object Force Runs the following compiled SRUNONCE.WBT WinBatch script that gives NAL the ability to process the HKLM\SOFTWARE\Microsoft\Windows\ CurrentVersion\RunOnce registry key:

if WinVersion(1) == 4

RunOnceList = RegQueryItem (@REGMACHINE,
"SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnce")
RunOnceCount = ItemCount (RunOnceList, @TAB)

for LoopControlVariable = 1 to RunOnceCount

RunOnceItem = ItemExtract (LoopControlVariable, RunOnceList, @TAB)
RunOnceItemValue = RegQueryValue(@REGMACHINE, "SOFTWARE\Microsoft\Windows\ CurrentVersion\RunOnce[%RunOnceItem%]")

RunOnceItemValueCount = ItemCount (RunOnceItemValue, " ")
RunOnceItemValueCommand = ItemExtract (1, RunOnceItemValue, " ")
RunOnceItemValueParameter = ""
if RunOnceItemValueCount > 1 then RunOnceItemValueParameter = ItemRemove (1, RunOnceItemValue, " ")

RunWait (RunOnceItemValueCommand, RunOnceItemValueParameter)
RegDelValue(@REGMACHINE, "SOFTWARE\Microsoft\Windows\ CurrentVersion\RunOnce[%RunOnceItem%]")

next

endif

If you didn't want to use WinBatch, you could just identify everything that Internet Explorer puts under the RunOnce key and just run them individually via ZENworks. Also note that I am only running this application object for users who are locked down via the NAL shell (see HKLM\SOFTWARE\Swelling\WSState[Lock]). I will explain how the shell is changed based upon membership in a single group in a future article.

But there is one last problem: processing the Run key. I didn't want to open up the Run key so that anything placed under it would automatically be run, so I identified the only line that Internet Explorer adds. This third and final application object appears below:

AXT_FILE 3.0

[Application Name]
Value=MSIE55LOADWC-CFG2

[Application Caption]
Value=Internet Explorer LoadWC

[Filter OS Version]
Type=Windows 95
Major Version=-1
Minor Version=-1
Revision Version=-1

[Filter Registry Data]
Type=Binary
Key=HKEY_LOCAL_MACHINE\SOFTWARE\Swelling
Value=AppMSIE
Length=3
Data=35 2E 35
Flag=Equals

[Application Association Flags]
Flag=Force Run

[Application Path]
Value=%*WINSYSDIR%\LOADWC.EXE

[Application Flags]
Flag=Do not Cleanup Resources
Flag=Never Prompt Reboot
Flag=No Distribution Window
Flag=Launch Hidden
Flag=Force Run Wait

[Application Icon Order]
Value=12

[Application Platform]
Flag=Windows 95

This application object Force Runs the LOADWC.EXE that is installed with Internet Explorer, and it runs it only after Internet Explorer has been installed (see HKLM\SOFTWARE\Swelling\AppMSIE[5.5]).

Now that Internet Explorer has been successfulling installed, a user can now double-click on the MSINTERNETEXPLORER55-APP5 icon to start Internet Explorer.

Also note that MSINTERNETEXPLORER55-APP5 and MSIE55LOADWC-CFG2 should be GUID synced so that Internet Explorer does not have to be re-installed for each user who logs in to a PC.

The above will not currently work under Windows NT, mainly because the distribution scripts only run in the system context (see TID 2953773). If you do not care that the user cannot see the unattended installation of IE, then you could change the MSINTERNETEXPLORER55-APP5 to copy the installation files down to the local hard drive first and run the installation from there. Also, REGINI.EXE from the NT Resource Kit can be scripted to change the security on the RunOnce key via an application object run as a System user.

If you have any questions you may contact Karl at zenworks@swelling.net


Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com

© 2014 Novell