China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-06-28 07:43
中国DOS联盟论坛 » 其它操作系统综合讨论区 » Backing up drivers with pure script借助DevCon, compatible with Driver Genius (2008-01-17) View 81,557 Replies 72
Floor 46 Posted 2008-02-09 21:24 ·  中国 上海 松江区 电信
铂金会员
★★★★
DOS一根葱
Credits 5,493
Posts 2,315
Joined 2006-05-01 10:41
20-year member
UID 54766
Gender Male
From 上海
Status Offline
Oh, I'm also confused. You can't back up without plugging in the printer. You need to read the registry for offline backup of the driver.
第一高手 第二高手

Floor 47 Posted 2008-02-09 21:27 ·  中国 江苏 扬州 邗江区 中移铁通
初级用户
Credits 80
Posts 37
Joined 2008-02-06 18:34
18-year member
UID 110292
Gender Male
Status Offline
Haha, but this for /f "tokens=1* delims=: " %%b in ('devcon findall %%a\*^|find "\"') do echo "%%b"****"%%
Can be backed up,

I generally use software to back up now, I don't know, can this be made more perfect, haha,

[ Last edited by ttj36 on 2008-2-9 at 09:32 PM ]
Floor 48 Posted 2008-02-09 21:49 ·  中国 上海 松江区 电信
铂金会员
★★★★
DOS一根葱
Credits 5,493
Posts 2,315
Joined 2006-05-01 10:41
20-year member
UID 54766
Gender Male
From 上海
Status Offline
Two for loops generate two Devinfo.slz. Filter out the ones with the same name, and those are the driver parts that need to be offline. Next time when making changes, add this part of the code. Thanks for testing~
第一高手 第二高手

Floor 49 Posted 2008-02-09 21:58 ·  中国 江苏 扬州 邗江区 中移铁通
初级用户
Credits 80
Posts 37
Joined 2008-02-06 18:34
18-year member
UID 110292
Gender Male
Status Offline
But some people have many offline drivers in their machines. There's no need to do all of them; that's not asking for trouble, haha. Now it's already very perfect. As long as we can simplify the drivers a bit, just the main parts. Now back up the basic drivers. There are still a few that are not useful when installing the system,,,

[ Last edited by ttj36 on 2008-2-9 at 10:05 PM ]
Floor 50 Posted 2008-02-09 22:31 ·  中国 江苏 扬州 邗江区 中移铁通
初级用户
Credits 80
Posts 37
Joined 2008-02-06 18:34
18-year member
UID 110292
Gender Male
Status Offline
for %%a in (USBPRINT) do (
for /f "tokens=1* delims=: " %%b in ('devcon findall %%a\*^|find "\"') do echo "%%b"****"%%c">>"%Temp:"=%.\Devinfo.slz"
)
Your idea is indeed a good one. Just need to make an offline printer. Just add it.
I mean, use the above code to back up the offline printer driver and add it. I don't know if it can be achieved.

[ Last edited by ttj36 on 2008-2-9 at 11:25 PM ]
Floor 51 Posted 2008-02-09 22:45 ·  中国 上海 松江区 电信
铂金会员
★★★★
DOS一根葱
Credits 5,493
Posts 2,315
Joined 2006-05-01 10:41
20-year member
UID 54766
Gender Male
From 上海
Status Offline
Thanks for the test~
USBPRINT added in building 1 code
第一高手 第二高手

Floor 52 Posted 2008-02-10 19:04 ·  中国 江苏 泰州 泰兴市 中移铁通
初级用户
Credits 80
Posts 37
Joined 2008-02-06 18:34
18-year member
UID 110292
Gender Male
Status Offline
The "safely remove USB drive" doesn't work. As soon as I use it, my mouse stops moving. Haha, but the mouse is a USB interface.
Floor 53 Posted 2008-02-10 19:32 ·  中国 上海 松江区 电信
铂金会员
★★★★
DOS一根葱
Credits 5,493
Posts 2,315
Joined 2006-05-01 10:41
20-year member
UID 54766
Gender Male
From 上海
Status Offline
Originally posted by ttj36 at 2008-2-10 19:04:
The "safely remove USB drive" function didn't work. Once I used it, my mouse stopped moving. Haha, but the mouse is a USB interface.

There is a better solution for this post
http://www.cn-dos.net/forum/viewthread.php?tid=37059&fpage=1
第一高手 第二高手

Floor 54 Posted 2008-03-14 12:47 ·  中国 广东 广州 电信
初级用户
★★
Credits 168
Posts 85
Joined 2005-08-26 00:19
20-year member
UID 41941
Gender Male
Status Offline
That's extremely powerful, thank you the LZ for sharing!
Floor 55 Posted 2008-03-17 12:32 ·  中国 广东 东莞 电信
银牌会员
★★★
Credits 1,282
Posts 538
Joined 2002-11-02 00:00
23-year member
UID 129
Gender Male
Status Offline
Execute this batch:
@echo off
setlocal enabledelayedexpansion
set "target_inf="
for /f "tokens=2 delims==" %%a in ('findstr /i /c:"PCI\VEN_1002" findall.txt') do (
set "target_inf=%%a"
goto :print_inf
)
:print_inf
echo %target_inf%
pause>nul


The following corresponds to the manual installation of the driver batch (for your machine, related to PCI, USB and main oem?.inf):
@echo off
setlocal enabledelayedexpansion
set "target_inf="
for /f "tokens=2 delims==" %%a in ('findstr /i /c:"PCI\VEN_1002" findall.txt') do (
set "target_inf=%%a"
goto :print_inf
)
:print_inf
echo %target_inf%
pause>nul


Actually, after a new XP system is installed, the manually installed drivers are only as follows:
;以下对应 Windows\inf\oem1.inf(显卡)
PCI\VEN_1002&DEV_4153&SUBSYS_00901043&REV_00\4&3600494A&0&0008: ATI Radeon 9550 / X1050 Series
PCI\VEN_1002&DEV_4173&SUBSYS_00911043&REV_00\4&3600494A&0&0108: ATI Radeon 9550 / X1050 Series Secondary
;以下对应 Windows\inf\oem2.inf(声卡)
PCI\VEN_1106&DEV_3059&SUBSYS_812A1043&REV_60\3&267A616A&0&8D: Realtek AC'97 Audio for VIA (R) Audio Controller
;以下对应 Windows\inf\oem3.inf(RAID)
PCI\VEN_1106&DEV_3149&SUBSYS_80ED1043&REV_80\3&267A616A&0&78: VIA SATA RAID Controller
;以下对应 Windows\inf\oem0.inf(网卡)
PCI\VEN_11AB&DEV_4320&SUBSYS_811A1043&REV_13\3&267A616A&0&50: Marvell Yukon 88E8001/8003/8010 PCI Gigabit Ethernet Controller
;以下对应 Windows\inf\oem4.inf(摄像头)
USB\VID_0A81&PID_0205&MI_00\6&4D1532D&0&0000 : USB
USB\VID_0A81&PID_0205&MI_00\6&DE85D78&0&0000 : USB
USB\VID_0A81&PID_0205&MI_01\6&4D1532D&0&0001 : USB
USB\VID_0A81&PID_0205&MI_01\6&DE85D78&0&0001 : USB
USB\VID_0AC8&PID_307B\5&3278073A&0&1 : PC Camera


Seek a batch that only backs up manually installed drivers (related to PCI, USB and main oem?.inf for your machine), thank you!
Floor 56 Posted 2008-04-10 18:49 ·  中国 广西 南宁 电信
新手上路
Credits 2
Posts 1
Joined 2008-04-10 18:04
18-year member
UID 115506
Gender Male
Status Offline
Good stuff
Floor 57 Posted 2008-04-21 16:52 ·  中国 辽宁 锦州 电信
初级用户
Credits 64
Posts 46
Joined 2008-04-21 14:54
18-year member
UID 116504
Gender Male
Status Offline
That's really amazing!!!
Floor 58 Posted 2008-04-23 13:50 ·  中国 浙江 杭州 电信
初级用户
Credits 55
Posts 28
Joined 2007-12-24 11:57
18-year member
UID 106624
Gender Male
Status Offline
Not bad. A master among masters. Strong.
Floor 59 Posted 2008-04-29 16:11 ·  美国 xfinity
新手上路
Credits 2
Posts 1
Joined 2007-07-03 01:07
18-year member
UID 92986
Gender Male
Status Offline
Great, can it be downloaded?
Floor 60 Posted 2008-04-30 11:34 ·  中国 安徽 合肥 巢湖市 电信
新手上路
Credits 4
Posts 2
Joined 2008-04-30 11:09
18-year member
UID 117353
Gender Male
Status Offline
Forum Jump: