It’s a lot of posts that explained how to detect HAL. Almost all of those solutions done in VB script. As well I’ve seen a lot of post about “problems’ running VB script under WinPE. So, one day I tried to create a batch file, that allows to detect a HAL under WinPE. I did all my tests under VistaPE 12 (I’ve used the VistaPE v.12 RC1).
Here is content of HAL_Detector.bat script:@echo off
REM .
REM . - Advanced Configuration and Power Interface (ACPI) PC: ACPIPIC_UP
REM . - ACPI Uniprocessor PC: ACPIAPIC_UP
REM . - ACPI Multiprocessor PC: ACPIAPIC_MP
REM .
REM . Advanced Configuration and Power Interface (ACPI) PC
REM . - halacpi.dll (renamed to hal.dll)
REM . - ntkrnlpa.exe
REM . - ntoskrnl.exe
REM .
REM . ACPI Uniprocessor PC
REM . - halaacpi.dll (renamed to hal.dll)
REM . - ntkrnlpa.exe
REM . - ntoskrnl.exe
REM .
REM . ACPI Multiprocessor PC
REM . - halmacpi.dll (renamed to hal.dll)
REM . - ntkrpamp.exe (renamed to ntkrnlpa.exe)
REM . - ntkrnlmp.exe (renamed to ntoskrnl.exe)
REM .
REM ……………….. Explanation About Diferent HAL Versions ………………… ……..
REM .
SETLOCAL
SET PC-HAL=
SET NumberOfLogicalProcessors=
SET New-HAL=
For /F “Tokens=3 Delims= ” %%a in (’REG QUERY HKLM\SYSTEM\CurrentControlSet\Enum\
IF %PC-HAL% == acpipic Set New-HAL=ACPI_Uniprocessor_PC
IF %PC-HAL% == acpiapic (
For /F %%a in (’@WMIC COMPUTERSYSTEM GET NumberOfLogicalProcessors /value^|find “NumberOfLogicalProcessors”‘) do Set %%a
)
IF %NumberOfLogicalProcessors% == Set New-HAL=HAL_NOT_DETECTED
IF %NumberOfLogicalProcessors% == 1 Set New-HAL=ACPI_Uniprocessor_PC
IF %NumberOfLogicalProcessors% == 2 Set New-HAL=ACPI_Multiprocessor_PC
IF %NumberOfLogicalProcessors% == 4 Set New-HAL=ACPI_Multiprocessor_PC
@echo Detected HAL: %New-HAL%
@echo Number of Logical Processors: %NumberOfLogicalProcessors%
No comments:
Post a Comment