Determine which HAL was loaded in Win PE 2.1
I trying to automate the HAL detection and replacement using the Windows PE 2.1 automation environment. I am using the script below provided in "Altiris Deployment Solution 6.5 Hardware Independent Imaging v4". I have modified the script to include the ACPI Multiprocessor PC HAL , which is halmacpi.dll and the HardwareID in the registry key "HKLM\SYSTEM\ControlSet001\Enum\Root\ACPI_HAL\0000" is "acpiapic_mp".
I am getting an "incorrect function" status in the Deployment console when executing the "run script" task in Win PE automaton environment.
What I am doing wrong?
Here is the script:
=====================
REM The following is a sample batch file that can be run within the PE Shell
REM to determine which HAL was loaded and then copy the proper HAL from a stored location in the Drivers folder.
@ECHO OFF
:HAL
REM Lets query the registry to see what hal is used.
REM First HAL to check for is the Advanced Configuration and Power Interface HAL
REG QUERY HKLM\SYSTEM\ControlSet001\Enum\Root\ACPI_HAL\0000 /v HardwareId |Find /I /C "acpipic_up"
REM Found the HAL lets move down to ACPI
IF %ERRORLEVEL% EQU 0 GOTO ACPI
REM HAL not found lets check the next value
REM Second HAL to check for is the Uniprocessor HAL
REG QUERY HKLM\SYSTEM\ControlSet001\Enum\Root\ACPI_HAL\0000 /v HardwareId |Find /I /C "acpiapic_up"
REM Found the HAL lets move down to AACPI
IF %ERRORLEVEL% EQU 0 GOTO AACPI
REM Third HAL to check for is the ACPI Multiprocessor PC HAL
REG QUERY HKLM\SYSTEM\ControlSet001\Enum\Root\ACPI_HAL\0000 /v HardwareId |Find /I /C "acpiapic_mp"
REM Found the HAL lets move down to MACPI
IF %ERRORLEVEL% EQU 0 GOTO MACPI
GOTO :NOHAL
:ACPI
REM Copy in the correct HAL
.\Rdeploy\Windows\Firm copy prod:\drivers\halacpi.dll prod:\Windows\System32\HAL.dll
GOTO END
:AACPI
REM Copy in the correct HAL
.\Rdeploy\Windows\Firm copy prod:\drivers\halaacpi.dll prod:\Windows\System32\HAL.dll
GOTO END
:MACPI
REM Copy in the correct HAL
.\Rdeploy\Windows\Firm copy prod:\drivers\halmacpi.dll prod:\Windows\System32\HAL.dll
GOTO END
:NOHAL
ECHO Can not find the appropriate HAL to use. Leaving as is.
:END
ECHO Process finished successfully.
EXIT
==========================
Comments
Never could get that to work
I never got the HII to work (could never get it installed as it wanted 6.8, and I was at 6.9). I just ran my own script after I had already identified which HAL's went with which hardware. The script runs directly after imaging and uses firm to delete the existing HAL and then to copy the new one over at the same time the drivers for that model are copied over.
Brian Hawver
Systems Engineer
Yaskawa America, Inc.
Connect Etiquette: "Mark as Solution" those posts which resolve your problem, and give a thumbs up to useful comments, articles and downloads.
This article should solve your problem.
I posted a article describing how to copy the HAL using WinPE 2.1 or WinPE 1.6
Article name:
Replacing the HAL using either WinPE 1.6 or 2.x
this should sound your problem.
Would you like to reply?
Login or Register to post your comment.