The Hardware Abstraction Layer (HAL) is a crucial kernel-mode module in the Windows system that sits between the operating system and the hardware. Several different HALs are included with windows, but only the specific one for the system's hardware is copied to the system's disk at installation time.
Having different HAL's is what makes Windows portable to different hardware platforms but having an incorrect HAL can cause your system to work sluggishly or cause unexplained system lockups. During installation the HAL's original name is recorded in the setup log and then the HAL is copied to the system's disk with the filename hal.dll.
One way to determine which HAL is installed on your system is to open the file \windows\repair\setup.log and search for the line \WINDOWS\system32\hal.dll = . The original name of the HAL will be after the equals sign.
The script shown below will open the file setup.log in Windows Notepad, where you can inspect the entire file contents. Paste these lines into a text file and save it with the extension .vbs, for example view_setuplog.vbs. The double-click on the file name to execute the script.
Set ws = WScript.CreateObject("WScript.Shell") ws.Run ws.ExpandEnvironmentStrings("%SystemRoot%\notepad.exe %SystemRoot%\repair\setup.log")
The script shown below will open the file setup.log and scan through it for a line containing the text hal.dll =. When it locates the line, it will extract the name of the HAL and open a message box providing information about the HAL. Paste these lines into a text file and save it with the file name view_hal.vbs.
Set ws = WScript.CreateObject("WScript.Shell") Set fs = CreateObject("Scripting.FileSystemObject") Set f = fs.OpenTextFile(ws.ExpandEnvironmentStrings("%SystemRoot%\repair\setup.log"),1,True) Do While f.AtEndOfStream <> True data = f.ReadLine If InStr(data,"hal.dll =") Then Exit Do End If Loop loc1 = InStrRev(data, "= ") loc2 = InStrRev(data, ".dll") hal = Mid(data,loc1 + 3,loc2 - loc1 + 1) Select Case hal Case "hal.dll" Msgbox "HAL is hal.dll for standard PC" Case "halacpi.dll" Msgbox "HAL is halacpi.dll for ACPI PC" Case "halapic.dll" Msgbox "HAL is halapic.dll for APIC PC" Case "halaacpi.dll" Msgbox "HAL is halaacpi.dll for APIC ACPI PC" Case "halmps.dll" Msgbox "HAL is halmps.dll for Multiprocessor PC" Case "halmacpi.dll" Msgbox "HAL is halmacpi.dll for Multiprocessor ACPI PC" Case "halsp.dll" Msgbox "HAL is halsp.dll for Compaq SystemPro" Case Else Msgbox "HAL is " & hal End Select
In the message, ACPI means the HAL is designed for systems with the Advanced Configuration and Power Interface (basically plug-and-play). APIC means the HAL is designed for systems with an Advanced Programmable Interrupt Controller, an interrupt controller that can manage interrupts from multiple processors.
The HAL is a crucial module that sits between the operating system and the hardware. Having an incorrect HAL can cause your system to work sluggishly or cause unexplained system lockups. The script provide in this article will identify which HAL was installed on your system.
Note: The script in this article is provided AS IS without warranty of any kind. Bucaro TecHelp disclaims all implied warranties including, without limitation, any implied warranties of merchantability or of fitness for a particular purpose. The entire risk arising out of the use of the script remains with you. In no event shall Bucaro TecHelp be liable for any damages whatsoever arising out of the use of or inability to use this script.
More Windows Administration Information:
• Installing a Local Printer on Windows Vista
• Choosing a Tape Drive
• Script to Print a Directory File List
• How to Backup Mails and Address Book of Outlook Express
• How to Share a Printer
• Set the User's Profile Information
• Configure Windows Indexing Service for Performance
• How to Create a Bootable USB Drive
• Hands-On Microsoft Windows Server 2008 Administration
• CompTIA A+ Complete Study Guide