|
help me!pe下安装xp ,整合SRS出错!
东芝笔记本,g41芯片,骨头版pe ,进pe后认得了硬盘,表明驱动OK,于是用论坛的XP 安装工具,开始安装,拷贝完xp文件后,整合SRS驱动出错,好像是无法打开iostr.sys,重启后显示无法找到txtsetup.sif。最后没办法只能关闭ahci,安装XP。下面是那个工具的cmd文件,请问是错在哪里?
还有,这个工具能不能改进一下?自动加载winnt.sif,这样就不用每次都要输入序列号了。也就是类似这样的自动安装的cmd文件:
\i386\winnt32 /dudisable /s:.\i386 /unattend:.\i386\winnt.sif /makelocalsource /tempdrive:%drive_letter%
=============================
@echo off
setlocal EnableExtensions EnableDelayedExpansion
set HardwareIDFound=
set Source_SystemRoot=%windir%
if /I [%~1]==[-S] (set Source_SystemRoot=%~2&shift)
SET TP=%~dp0
SET TP=%TP:~0,-1%
color 1f
title WinPE下安装XP、2003辅助工具v2.1 by zhhsh
echo WinPE下安装XP、2003辅助工具v2.0
echo ====================================================
echo.
echo 本工具主要解决“纯净XP、2003安装版”(无作任何修改)
echo 在WinPE下安装SATA\RAID\SCSI识别问题。
echo.
echo 支持从WinPE提取SATA\RAID\SCSI驱动
echo 暂不支持自动应答方式安装
echo.
echo 本工具的工作流程:
echo 1.询问XP、2003安装程序的安装来源、目标分区
echo 2.运行安装程序
echo 3.进行SATA\RAID\SCSI驱动整合(修改txtsetup.sif)
echo 4.重启电脑继续安装
echo.
echo 本工具版权所冇。
echo 无忧启动论坛 bbs.wuyou.net
echo.
echo ====================================================
echo 请按任意键开始安装。。。否则请关闭本窗口!
echo ====================================================
pause
cls
echo ------------------------------------------------------------
echo 第一步:询问XP、2003安装源所在分区、目标分区
echo 注意事项:
echo 安装程序应在某分区根下的 I386 目录或某目录下的 I386 目录
echo ------------------------------------------------------------
set /p source_drive=XP、2003安装源所在分区(C/D/E/F...)
If not EXIST %source_drive%:\I386\winnt32.exe (
echo 错误:该目录没有I386\winnt32.exe
echo 按任意键退出。。。
pause
exit
) else (
goto :install
)
:install
echo ------------------------------------------------------------
echo XP、2003 启动分区是指安装启动文件(如 ntldr)的分区
echo 随后的安装过程可以选择 Windows 目录安装分区
echo 注意:XP、2003启动分区只能是主分区
echo ------------------------------------------------------------
set /p dest_drive=请输入 XP、2003启动分区(C/D/E/F...)
echo ------------------------------------------------------------
echo 开始安装。。。请不要关闭本窗口!
echo ------------------------------------------------------------
start /wait %source_drive%:\i386\winnt32.exe /s:%source_drive%:\i386 /makelocalsource /syspart:%dest_drive% /tempdrive:%dest_drive% /noreboot
copy /y %dest_drive%:\$ldr$ %dest_drive%:\ntldr
bootsect.exe /nt52 %dest_drive%:
echo ------------------------------------------------------------
echo 前期的安装完成!即将开始SATA\RAID\SCSI驱动整合
echo ------------------------------------------------------------
;===========================================================================================
expand %Source_SystemRoot%\txtsetup.si_ %Source_SystemRoot%\txtsetup.sif
cls
::=== Mass Storage Device =============================================
::Base Type = 1: Mass Storage Device
:: Sub-Type = 0 : SCSI Controller
:: Sub-Type = 1 : IDE Controller (Standard ATA compatible)
:: Sub-Type = 2 : Floppy Controller (Standard 765 compatible)
:: Sub-Type = 3 : IPI Controller
:: Sub-Type = 4 : RAID Controller
:: Sub-Type = 6 : AHCI Controller
:: Sub-Type = 80h: Other Mass Storage Controller
::=== Mass Storage Device - non IDE ===================================
echo =========================================
for %%a in (CC_0100 CC_0103 CC_0104 CC_0106 CC_0180) do call :detect_driver %%a
echo 请自行重启电脑来继续安装。。。
pause
exit
:detect_driver
for /f "tokens=1-2* skip=1 delims=\& " %%a IN ('devcon.exe hwids PCI\%1') DO (
if "%%a"=="Name:" (echo. &echo 类型: %%b &set i_count=0 &set HardwareIDFound=)
set /a i_count+=1
if !i_count! EQU 3 echo 检测 "%%a\%%b&%%c"
if not DEFINED HardwareIDFound if "%%a"=="PCI" if not "%%c"=="" (
set HardWareID="%%a\%%b&%%c"
set bb=%%b
if "%%c"=="" if "!bb:~0,3!"=="VEN" set HardWareID=
if DEFINED HardwareID for /f "tokens=1-2* delims==" %%h IN ('findstr.exe /I !HardWareID! "%Source_SystemRoot%\txtsetup.sif"') DO (
set HardwareIDFound=%%h
set driver=%%~i
)
set cc=%%c
if not DEFINED HardwareIDFound if "!cc:~0,3!"=="CC_" if "!cc:~7,1!"=="" echo 警告:没有找到驱动!
if DEFINED HardwareIDFound (
echo 已发现的硬件ID: !HardwareIDFound!
echo 对应驱动:!driver!
echo =========================================
set HardWareID=%%a#%%b^&%%c
set ClassGUID={4D36E97B-E325-11CE-BFC1-08002BE10318}
if "%1"=="CC_0106" set ClassGUID={4D36E96A-E325-11CE-BFC1-08002BE10318}
goto :add_drv
)
)
)
goto :eof =============================================================
:add_drv
attrib -r %dest_drive%:\txtsetup.sif
attrib -r %dest_drive%:\$WIN_NT$.~BT\txtsetup.sif
attrib -r %dest_drive%:\$WIN_NT$.~LS\i386\txtsetup.sif
echo 正在添加 !HardwareIDFound! 到 txtsetup.sif
inifile %dest_drive%:\txtsetup.sif [SourceDisksFiles] !driver!.sys=1,,,,,,4_,4,1,,,1,4
inifile %dest_drive%:\txtsetup.sif [HardwareIdsDatabase] !HardwareIDFound!="!driver!"
inifile %dest_drive%:\txtsetup.sif [SCSI.Load] !driver!=!driver!.sys,4
inifile %dest_drive%:\txtsetup.sif [SCSI] !driver!="!driver! SRS Driver"
copy /y %dest_drive%:\txtsetup.sif %dest_drive%:\$WIN_NT$.~BT
copy /y %dest_drive%:\txtsetup.sif %dest_drive%:\$WIN_NT$.~LS\i386
for %%t in (%Source_SystemRoot%\!driver!.sy? %Source_SystemRoot%\system32\drivers\!driver!.sy? %Source_SystemRoot%\drivers\!driver!.sy? %Source_SystemRoot%\driver\!driver!.sy?) do (
expand.exe %%t %dest_drive%:\$WIN_NT$.~LS\i386\!driver!.sys
expand.exe %%t %dest_drive%:\$WIN_NT$.~BT\!driver!.sys
) |
|