Pelekan Posted October 28, 2008 Share Posted October 28, 2008 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 test under VistaPE 12 (I've used the VistaPE v.12 RC1). Here is content of HAL_Detector.bat script:@echo offREM .REM . - Advanced Configuration and Power Interface (ACPI) PC: ACPIPIC_UPREM . - ACPI Uniprocessor PC: ACPIAPIC_UPREM . - ACPI Multiprocessor PC: ACPIAPIC_MPREM . REM . Advanced Configuration and Power Interface (ACPI) PCREM . - halacpi.dll (renamed to hal.dll)REM . - ntkrnlpa.exeREM . - ntoskrnl.exeREM . REM . ACPI Uniprocessor PCREM . - halaacpi.dll (renamed to hal.dll)REM . - ntkrnlpa.exeREM . - ntoskrnl.exeREM . REM . ACPI Multiprocessor PCREM . - 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 . SETLOCALSET PC-HAL=SET NumberOfLogicalProcessors=SET New-HAL=For /F "Tokens=3 Delims= " %%a in ('REG QUERY HKLM\SYSTEM\CurrentControlSet\Enum\Root\ACPI_HAL\0000 /v HardwareID') DO Set PC-HAL=%%aIF %PC-HAL% == acpipic Set New-HAL=ACPI_Uniprocessor_PCIF %PC-HAL% == acpiapic ( For /F %%a in ('@WMIC COMPUTERSYSTEM GET NumberOfLogicalProcessors /value^|find "NumberOfLogicalProcessors"') do Set %%a)IF %NumberOfLogicalProcessors% == Set New-HAL=HAL_NOT_DETECTEDIF %NumberOfLogicalProcessors% == 1 Set New-HAL=ACPI_Uniprocessor_PCIF %NumberOfLogicalProcessors% == 2 Set New-HAL=ACPI_Multiprocessor_PCIF %NumberOfLogicalProcessors% == 4 Set New-HAL=ACPI_Multiprocessor_PC@echo Detected HAL: %New-HAL%@echo Number of Logical Processors: %NumberOfLogicalProcessors%endlocal Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now