|
我发现史奴比恢复光盘中的ACPI电源管理是用 \sysprep\autohal.cmd 来控制的
请问是怎么具体实现的呢? 文件内容如下:
@echo off
if not exist %systemroot%\system32\ta.exe goto quit
if exist %systemroot%\system32\devices.pmq del %systemroot%\system32\devices.pmq
ta >nul
find "ACPIPIC_UP" %systemroot%\system32\devices.pmq && goto ACPI
find "ACPIAPIC_UP" %systemroot%\system32\devices.pmq && goto APICUP
find "ACPIAPIC_MP" %systemroot%\system32\devices.pmq && goto APICMP
find "MPS_UP" %systemroot%\system32\devices.pmq && goto MPSUP
find "MPS_MP" %systemroot%\system32\devices.pmq && goto MPSMP
find "SYSPRO_MP" %systemroot%\system32\devices.pmq && goto SYSPROMP
@echo Standard PC
goto end
:ACPI
echo Advanced Configuration and Power Interface (ACPI) PC
expand %systemroot%\Driver~1\I386\sp4.cab -F:ntoskrnl.exe %systemroot%\ || expand %systemroot%\Driver~1\I386\sp3.cab -F:ntoskrnl.exe %systemroot%\ || expand %systemroot%\Driver~1\I386\sp2.cab -F:ntoskrnl.exe %systemroot%\ || expand %systemroot%\Driver~1\I386\sp1.cab -F:ntoskrnl.exe %systemroot%\ || expand %systemroot%\Driver~1\I386\driver.cab -F:ntoskrnl.exe %systemroot%\
expand %systemroot%\Driver~1\I386\sp4.cab -F:halacpi.dll %systemroot%\ || expand %systemroot%\Driver~1\I386\sp3.cab -F:halacpi.dll %systemroot%\ || expand %systemroot%\Driver~1\I386\sp2.cab -F:halacpi.dll %systemroot%\ || expand %systemroot%\Driver~1\I386\sp1.cab -F:halacpi.dll %systemroot%\ || expand %systemroot%\Driver~1\I386\driver.cab -F:halacpi.dll %systemroot%\
move %systemroot%\ntoskrnl.exe %systemroot%\system32\
move %systemroot%\halacpi.dll %systemroot%\system32\hal.dll
goto end
:APICUP
echo ACPI Uniprocessor PC
expand %systemroot%\Driver~1\I386\sp4.cab -F:halaacpi.dll %systemroot%\ || expand %systemroot%\Driver~1\I386\sp3.cab -F:halaacpi.dll %systemroot%\ || expand %systemroot%\Driver~1\I386\sp2.cab -F:halaacpi.dll %systemroot%\ || expand %systemroot%\Driver~1\I386\sp1.cab -F:halaacpi.dll %systemroot%\ || expand %systemroot%\Driver~1\I386\driver.cab -F:halaacpi.dll %systemroot%\
expand %systemroot%\Driver~1\I386\sp4.cab -F:ntoskrnl.exe %systemroot%\ || expand %systemroot%\Driver~1\I386\sp3.cab -F:ntoskrnl.exe %systemroot%\ || expand %systemroot%\Driver~1\I386\sp2.cab -F:ntoskrnl.exe %systemroot%\ || expand %systemroot%\Driver~1\I386\sp1.cab -F:ntoskrnl.exe %systemroot%\ || expand %systemroot%\Driver~1\I386\driver.cab -F:ntoskrnl.exe %systemroot%\
move %systemroot%\ntoskrnl.exe %systemroot%\system32\
move %systemroot%\halaacpi.dll %systemroot%\system32\hal.dll
goto end
:APICMP
echo ACPI Multiprocessor PC
expand %systemroot%\Driver~1\I386\sp4.cab -F:halmacpi.dll %systemroot%\ || expand %systemroot%\Driver~1\I386\sp3.cab -F:halmacpi.dll %systemroot%\ || expand %systemroot%\Driver~1\I386\sp2.cab -F:halmacpi.dll %systemroot%\ || expand %systemroot%\Driver~1\I386\sp1.cab -F:halmacpi.dll %systemroot%\ || expand %systemroot%\Driver~1\I386\driver.cab -F:halmacpi.dll %systemroot%\
expand %systemroot%\Driver~1\I386\sp4.cab -F:ntkrnlmp.exe %systemroot%\ || expand %systemroot%\Driver~1\I386\sp3.cab -F:ntkrnlmp.exe %systemroot%\ || expand %systemroot%\Driver~1\I386\sp2.cab -F:ntkrnlmp.exe %systemroot%\ || expand %systemroot%\Driver~1\I386\sp1.cab -F:ntkrnlmp.exe %systemroot%\ || expand %systemroot%\Driver~1\I386\driver.cab -F:ntkrnlmp.exe %systemroot%\
move %systemroot%\halmacpi.dll %systemroot%\system32\hal.dll
move %systemroot%\ntkrnlmp.exe %systemroot%\system32\ntoskrnl.exe
goto end
:MPSUP
echo MPS Uniprocessor PC
expand %systemroot%\Driver~1\I386\sp4.cab -F:ntoskrnl.exe %systemroot%\ || expand %systemroot%\Driver~1\I386\sp3.cab -F:ntoskrnl.exe %systemroot%\ || expand %systemroot%\Driver~1\I386\sp2.cab -F:ntoskrnl.exe %systemroot%\ || expand %systemroot%\Driver~1\I386\sp1.cab -F:ntoskrnl.exe %systemroot%\ || expand %systemroot%\Driver~1\I386\driver.cab -F:ntoskrnl.exe %systemroot%\
expand %systemroot%\Driver~1\I386\sp4.cab -F:halapic.dll %systemroot%\ || expand %systemroot%\Driver~1\I386\sp3.cab -F:halapic.dll %systemroot%\ || expand %systemroot%\Driver~1\I386\sp2.cab -F:halapic.dll %systemroot%\ || expand %systemroot%\Driver~1\I386\sp1.cab -F:halapic.dll %systemroot%\ || expand %systemroot%\Driver~1\I386\driver.cab -F:halapic.dll %systemroot%\
move %systemroot%\halapic.dll %systemroot%\system32\hal.dll
move %systemroot%\ntoskrnl.exe %systemroot%\system32\
goto end
:MPSMP
echo MPS Multiprocessor PC
expand %systemroot%\Driver~1\I386\sp4.cab -F:ntkrnlmp.exe %systemroot%\ || expand %systemroot%\Driver~1\I386\sp3.cab -F:ntkrnlmp.exe %systemroot%\ || expand %systemroot%\Driver~1\I386\sp2.cab -F:ntkrnlmp.exe %systemroot%\ || expand %systemroot%\Driver~1\I386\sp1.cab -F:ntkrnlmp.exe %systemroot%\ || expand %systemroot%\Driver~1\I386\driver.cab -F:ntkrnlmp.exe %systemroot%\
expand %systemroot%\Driver~1\I386\sp4.cab -F:halmps.dll %systemroot%\ || expand %systemroot%\Driver~1\I386\sp3.cab -F:halmps.dll %systemroot%\ || expand %systemroot%\Driver~1\I386\sp2.cab -F:halmps.dll %systemroot%\ || expand %systemroot%\Driver~1\I386\sp1.cab -F:halmps.dll %systemroot%\ || expand %systemroot%\Driver~1\I386\driver.cab -F:halmps.dll %systemroot%\
move %systemroot%\halmps.dll %systemroot%\system32\hal.dll
move %systemroot%\ntkrnlmp.exe %systemroot%\system32\ntoskrnl.exe
goto end
:SYSPROMP
echo Compaq SystemPro Multiprocessor or 100% Compatible
expand %systemroot%\Driver~1\I386\sp4.cab -F:ntkrnlmp.exe %systemroot%\ || expand %systemroot%\Driver~1\I386\sp3.cab -F:ntkrnlmp.exe %systemroot%\ || expand %systemroot%\Driver~1\I386\sp2.cab -F:ntkrnlmp.exe %systemroot%\ || expand %systemroot%\Driver~1\I386\sp1.cab -F:ntkrnlmp.exe %systemroot%\ || expand %systemroot%\Driver~1\I386\driver.cab -F:ntkrnlmp.exe %systemroot%\
expand %systemroot%\Driver~1\I386\sp4.cab -F:halsp.dll %systemroot%\ || expand %systemroot%\Driver~1\I386\sp3.cab -F:halsp.dll %systemroot%\ || expand %systemroot%\Driver~1\I386\sp2.cab -F:halsp.dll %systemroot%\ || expand %systemroot%\Driver~1\I386\sp1.cab -F:halsp.dll %systemroot%\ || expand %systemroot%\Driver~1\I386\driver.cab -F:halsp.dll %systemroot%\
move %systemroot%\halsp.dll %systemroot%\system32\hal.dll
move %systemroot%\ntkrnlmp.exe %systemroot%\system32\ntoskrnl.exe
goto end
:end
reg delete HKLM\SYSTEM\ControlSet001\Enum\Root\ACPI_HAL\0000 /f
reg delete HKLM\SYSTEM\ControlSet001\Enum\Root\PCI_HAL\0000 /f
reg import c:\sysprep\sysprep.chk
:quit
@exit |
|