澶ф紶鑽掗|涓涓潚娴锋补鐢板瓙寮熺殑濂嬫枟鍙

涓涓潚娴锋补鐢板瓙寮熺殑濂嬫枟鍙

鑷姩鍏抽棴绌洪棽鐨処DE閫氶亾

| |
20:28 , 鍖楃含36搴
@ ECHO.
@ ECHO.
@ ECHO.                               璇   鏄
@ ECHO --------------------------------------------------------------------------
@ ECHO  IDE閫氶亾鍦ㄨ繖閲岀湅锛氳澶囩鐞嗗櫒---IDE ATA/ATAPI鎺у埗鍣ㄣ備竴鑸彲鐪嬪埌涓や釜鎴栧涓
@ ECHO  鍏跺睘鎬у唴鐨勨滆澶囩被鍨嬧濓紝绯荤粺榛樿鏄滆嚜鍔ㄦ娴嬧濓紝鎶婂畠璁句负鈥滄棤鈥濆彲浠ユ彁楂
@ ECHO  寮鏈洪熷害銆備絾濡傛灉浠ュ悗瑕佹帴纭洏鎴栧厜椹憋紝璇疯寰楁妸鐩稿簲鐨勯氶亾鏀逛负鈥滆嚜鍔ㄦ娴嬧濓紝
@ ECHO  鍚﹀垯杩涚郴缁熷悗鐪嬩笉鍒板畠浠
@ ECHO --------------------------------------------------------------------------
@ ECHO.
@ pause
@shift
:: 淇敼IDE閫氶亾妫娴嬭澶囨ā寮忥紝涓嶆帴璁惧鐨勮缃负鏃狅紝鎻愰珮XP鍚姩閫熷害
:: 寤鸿鍦ㄧ郴缁熺浜屾閲嶆柊鍚姩妫娴嬪埌鎵鏈夊凡缁忓畨瑁呯殑IDE璁惧鍚庤繍琛
:: Author: Climbing(xclimbing@msn.com)
:: Date: 2006.10.28
:: 淇:椤藉浐涓嶅寲(http://zzz.sogho.cn)
:: Date:2008.04.02
@set _debug=
@echo %_debug% off & setlocal ENABLEDELAYEDEXPANSION
set hkey1=HKLM\SYSTEM\CurrentControlSet\Enum\PCIIDE\IDEChannel
set hkey2=HKLM\SYSTEM\CurrentControlSet\Control\Class
echo 妫娴嬪紑濮.........
for /f "usebackq tokens=*" %%I in (`reg query %hkey1% ^| find /i "IDEChannel\"`) do call :_check "%%I"
@ ECHO.
@ ECHO.
@ ECHO.
echo IED閫氶亾妫娴嬭澶囨ā寮忚缃畬鎴愩
@ ECHO.
pause
goto :eof

:_check
::echo %1
set subkey=
for /f "usebackq tokens=3*" %%J in (`reg query %1 ^| find /i "driver"`) do set subkey=%%J
set DriverDesc=
for /f "usebackq tokens=3,4*" %%K in (`reg query "%hkey2%\%subkey%" /v DriverDesc ^| find /i "driverdesc"`) do set DriverDesc=%%K %%L 閫氶亾
reg query "%hkey2%\%subkey%" /v MasterDeviceType | find /i "0x0" > nul
if not %errorlevel%==1 goto _ChgMaster
echo 鈥%DriverDesc%鈥濈殑璁惧0涓婃湁璁惧瀛樺湪銆
goto _CheckSlave

:_ChgMaster
reg add "%hkey2%\%subkey%" /v UserMasterDeviceType /t REG_DWORD /d 3 /f >nul
echo 鈥%DriverDesc%鈥濈殑璁惧0涓婃棤璁惧锛岀郴缁熲滄娴嬫柟寮忊濊缃负鏃犮

:_CheckSlave
reg query "%hkey2%\%subkey%" /v SlaveDeviceType | find /i "0x0" > nul
if not %errorlevel%==1 goto _ChgSlave
echo 鈥%DriverDesc%鈥濈殑璁惧1涓婃湁璁惧瀛樺湪銆
goto :eof

:_ChgSlave
reg add "%hkey2%\%subkey%" /v UserSlaveDeviceType /t REG_DWORD /d 3 /f >nul
echo 鈥%DriverDesc%鈥濈殑璁惧1涓婃棤璁惧锛岀郴缁熲滄娴嬫柟寮忊濊缃负鏃犮
goto :eof
类别:MY IT TEXT | Tags: , | 0 条评论, 664 次阅读
网友评论(0):
发表评论:

鏄电О: 
鐢甸偖:
缃戝潃: