|
3#

楼主 |
发表于 2010-10-26 19:26:12
|
只看该作者
回复 #2 dingpe 的帖子
@echo off
title 在PE下安装硬盘控制器驱动简单脚本 by chenall 2008-12-14
rem 使用方法: 1.可直接拖放,即把对应驱动的SYS文件拖放到这个程序的图标上.
rem 2.使用命令行pe_scsi.cmd [你的SYS文件]
if "%1"=="" goto :eof
>"%temp%\scsi_serv.inf" echo.
>>"%temp%\scsi_serv.inf" echo.[Version]
>>"%temp%\scsi_serv.inf" echo.signature = "$Windows NT$"
>>"%temp%\scsi_serv.inf" echo.[DefaultInstall.Services]
>>"%temp%\scsi_serv.inf" echo.AddService = %~n1,,Service
>>"%temp%\scsi_serv.inf" echo.[Service]
>>"%temp%\scsi_serv.inf" echo.DisplayName = "%~n1 Service"
>>"%temp%\scsi_serv.inf" echo.Description = "%~1"
>>"%temp%\scsi_serv.inf" echo.ServiceType = 2
>>"%temp%\scsi_serv.inf" echo.StartType = 2
>>"%temp%\scsi_serv.inf" echo.ErrorControl = 1
>>"%temp%\scsi_serv.inf" echo.ServiceBinary = %%12%%\%~nx1
copy /y %1 %WinDir%\system32\drivers >nul
rundll32.exe setupapi,InstallHinfSection DefaultInstall 132 %temp%\scsi_serv.inf
if not errorlevel 1 (echo.%~nX1驱动安装成功!&pecmd serv %~n1&pause) else (echo.安装失败!
&pause)
del /f /q "%temp%\scsi_serv.inf"
这样可不可以实现动态加载? |
|