|
4#

楼主 |
发表于 2008-1-8 13:47:06
|
只看该作者
找到了有关内容,帮我精减一下。只留下一个功能:手工选择HAL。其他的不要。
autohal.bat
@echo off
reg import c:\sysprep\sysprep.chk >nul
cd\sysprep
cls
call w.bat box @autohal.bat:ntfs #1,30
if errorlevel 100 goto start
if errorlevel 2 goto ntfson
if errorlevel 1 goto start
:ntfs " Do you want Convert {C Disk} to NTFS format? " [x]
[(&N)o,] I don't
[(&Y)es,] Convert {C Disk} to NTFS Format
#?
::
goto start
:ntfson
reg add "HKLM\SYSTEM\ControlSet001\Control\Session Manager" /v BootExecute /t REG_MULTI_SZ /d "autocheck autochk *\0autocheck autoconv \??\C: /FS:NTFS" /f
:Start
cls
call w.bat box @autohal.bat:menu #8,30
if errorlevel 100 goto end
for %%i in (8 7 6 5 4 3 2 1) do if errorlevel %%i goto sele%%i
:menu " Select Your Computer of ACPI " [x]
Select [[A-H] ^
[&A]. Standard PC
[&B]. ACPI Uniprocessor PC
[&C]. ACPI Multiprocessor PC
[&D]. MPS Uniprocessor PC
[&E]. MPS Multiprocessor PC
[&F]. Compaq Sysxempro Multiprocessor or 100 Compatible
[&G]. Advanced Configuration and Power Interface (ACPI) PC
[&H]. Auto (default)
#?
::
:SELE1
rundll32.exe setupapi,InstallHinfSection E_ISA_UP_HAL 131 %windir%\inf\hal.inf
goto REGSET
:SELE2
rundll32.exe setupapi,InstallHinfSection ACPIAPIC_UP_HAL 131 %windir%\inf\hal.inf
goto REGSET
:SELE3
rundll32.exe setupapi,InstallHinfSection ACPIAPIC_MP_HAL 131 %windir%\inf\hal.inf
goto REGSET
:SELE4
rundll32.exe setupapi,InstallHinfSection MPS_UP_HAL 131 %windir%\inf\hal.inf
goto REGSET
:SELE5
rundll32.exe setupapi,InstallHinfSection MPS_MP_HAL 131 %windir%\inf\hal.inf
goto REGSET
:SELE6
rundll32.exe setupapi,InstallHinfSection SYSPRO_MP_HAL 131 %windir%\inf\hal.inf
goto REGSET
:SELE7
rundll32.exe setupapi,InstallHinfSection ACPIPIC_UP_HAL 131 %windir%\inf\hal.inf
goto REGSET
:SELE8
c:\sysprep\ta.exe >nul
c:\sysprep\cpuz -file=c:\sysprep\cpu.htm
find /i "Number of CPUs" c:\sysprep\cpu.htm >c:\sysprep\cpu.chk
find /i "ACPIPIC_UP" c:\sysprep\devices.pmq >nul && goto ACPIPIC_UP
find /i "ACPIAPIC_UP" c:\sysprep\devices.pmq >nul && goto ACPIAPIC_UP
find /i "ACPIAPIC_MP" c:\sysprep\devices.pmq >nul && goto ACPIAPIC_MP
find /i "MPS_UP" c:\sysprep\devices.pmq >nul && goto MPS_UP
find /i "MPS_MP" c:\sysprep\devices.pmq >nul && goto MPS_MP
find /i "SYSPRO_MP" c:\sysprep\devices.pmq >nul && goto SYSPRO_MP
find /i "SGI_MPS" c:\sysprep\devices.pmq >nul && goto SGI_MPS
find /i "E_ISA_UP" c:\sysprep\devices.pmq >nul && goto E_ISA_UP
goto REGSET
:ACPIPIC_UP
wbat box (blue on light brown) "Advanced Configuration and Power Interface (ACPI) PC" Yes,No #1,10
if errorlevel 2 goto start
rundll32.exe setupapi,InstallHinfSection ACPIPIC_UP_HAL 131 %windir%\inf\hal.inf
goto REGSET
:ACPIAPIC_UP
find "4" c:\sysprep\cpu.chk >nul && goto ACPIAPIC_MP
find "3" c:\sysprep\cpu.chk >nul && goto ACPIAPIC_MP
find "2" c:\sysprep\cpu.chk >nul && goto ACPIAPIC_MP
wbat box (blue on light brown) "ACPI Uniprocessor PC" Yes,No #1,10
if errorlevel 2 goto start
rundll32.exe setupapi,InstallHinfSection ACPIAPIC_UP_HAL 131 %windir%\inf\hal.inf
goto REGSET
:ACPIAPIC_MP
find "1" c:\sysprep\cpu.chk >nul && goto ACPIAPIC_UP
wbat box (blue on light brown) "ACPI Multiprocessor PC" Yes,No #1,10
if errorlevel 2 goto start
rundll32.exe setupapi,InstallHinfSection ACPIAPIC_MP_HAL 131 %windir%\inf\hal.inf
goto REGSET
:MPS_UP
find "4" c:\sysprep\cpu.chk >nul && goto MPS_MP
find "3" c:\sysprep\cpu.chk >nul && goto MPS_MP
find "2" c:\sysprep\cpu.chk >nul && goto MPS_MP
wbat box (blue on light brown) "MPS Uniprocessor PC" Yes,No #1,10
if errorlevel 2 goto start
rundll32.exe setupapi,InstallHinfSection MPS_UP_HAL 131 %windir%\inf\hal.inf
goto REGSET
:MPS_MP
find "1" c:\sysprep\cpu.chk >nul && goto MPS_UP
wbat box (blue on light brown) "MPS Multiprocessor PC" Yes,No #1,10
if errorlevel 2 goto start
rundll32.exe setupapi,InstallHinfSection MPS_MP_HAL 131 %windir%\inf\hal.inf
goto REGSET
:SYSPRO_MP
wbat box (blue on light brown) "Compaq Sysxempro Multiprocessor or 100 Compatible" Yes,No #1,10
if errorlevel 2 goto start
rundll32.exe setupapi,InstallHinfSection SYSPRO_MP_HAL 131 %windir%\inf\hal.inf
goto REGSET
:SGI_MPS
wbat box (blue on light brown) "Silicon Graphics Visual Workstation" Yes,No #1,10
if errorlevel 2 goto start
rundll32.exe setupapi,InstallHinfSection SGI_MPS_MP_HAL 131 %windir%\inf\hal.inf
goto REGSET
:E_ISA_UP
wbat box (blue on light brown) "Standard PC" Yes,No #1,10
if errorlevel 2 goto start
rundll32.exe setupapi,InstallHinfSection E_ISA_UP_HAL 131 %windir%\inf\hal.inf
goto REGSET
:REGSET
reg add HKLM\SYSTEM\CurrentControlSet\Enum\SW /f>nul
reg add HKLM\SYSTEM\CurrentControlSet\Enum\USB /f>nul
reg add HKLM\SYSTEM\CurrentControlSet\Enum\FDC /f>nul
reg add HKLM\SYSTEM\CurrentControlSet\Enum\IDE /f>nul
reg add HKLM\SYSTEM\CurrentControlSet\Enum\ACPI /f>nul
reg add HKLM\SYSTEM\CurrentControlSet\Enum\SCSI /f>nul
reg delete HKLM\SYSTEM\CurrentControlSet\Enum\SW /f>nul
reg add HKLM\SYSTEM\CurrentControlSet\Enum\ISAPNP /f>nul
reg delete HKLM\SYSTEM\CurrentControlSet\Enum\USB /f>nul
reg delete HKLM\SYSTEM\CurrentControlSet\Enum\FDC /f>nul
reg delete HKLM\SYSTEM\CurrentControlSet\Enum\IDE /f>nul
reg delete HKLM\SYSTEM\CurrentControlSet\Enum\PCI /f>nul
reg add HKLM\SYSTEM\CurrentControlSet\Enum\PCIIDE /f>nul
reg delete HKLM\SYSTEM\CurrentControlSet\Enum\ACPI /f>nul
reg delete HKLM\SYSTEM\CurrentControlSet\Enum\SCSI /f>nul
reg add HKLM\SYSTEM\CurrentControlSet\Enum\DISPLAY /f>nul
reg add HKLM\SYSTEM\CurrentControlSet\Enum\LPTENUM /f>nul
reg add HKLM\SYSTEM\CurrentControlSet\Enum\STORAGE /f>nul
reg delete HKLM\SYSTEM\CurrentControlSet\Enum\PCIIDE /f>nul
reg delete HKLM\SYSTEM\CurrentControlSet\Enum\ISAPNP /f>nul
reg delete HKLM\SYSTEM\CurrentControlSet\Enum\DISPLAY /f>nul
reg delete HKLM\SYSTEM\CurrentControlSet\Enum\LPTENUM /f>nul
reg delete HKLM\SYSTEM\CurrentControlSet\Enum\STORAGE /f>nul
reg add HKLM\SYSTEM\CurrentControlSet\Enum\Root\PCI_HAL /f >nul
reg add HKLM\SYSTEM\CurrentControlSet\Enum\Root\ACPI_HAL /f >nul
reg delete "HKLM\SYSTEM\CurrentControlSet\Enum\Root\PCI_HAL" /f >nul
reg delete "HKLM\SYSTEM\CurrentControlSet\Enum\Root\ACPI_HAL" /f >nul
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v IMJPMIG8.1 /f >nul
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v PHIME2002A /f >nul
reg delete HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run /v PHIME2002ASync /f >nul
set prep=d:;e:;f:;g:;h:;i:;j:;k:;l:;m:;n:;o:;p:;q:;r:;s:;t:;u:;v:;w:;x:;y:;z:
for %%s in (%prep%) do if exist %%s\sysprep.inf copy %%s\sysprep.inf c:\sysprep\ >nul
:end |
|