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-08-03 19:25
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Problem with using the autorun.inf file on a USB flash drive to enable AutoPlay View 1,158 Replies 10
Original Poster Posted 2007-03-11 01:58 ·  中国 浙江 绍兴 诸暨市 电信
高级用户
★★★
Autowalk
Credits 845
Posts 375
Joined 2007-03-03 01:58
19-year member
UID 80606
Gender Male
Status Offline
I put an XP system on a USB flash drive, and every time I install it I have to copy it out manually, so I wrote a BAT and then compiled it into an EXE file. I wanted to use an autorun file to enable AutoPlay, but it can only change the disk icon. Double-clicking it still won't run that EXE file. Why is that?

I'm using XP2
Contents of the autorun.inf file:


open=setup.exe
icon=setup.exe,0

[ Last edited by zhoushijay on 2007-3-10 at 01:08 PM ]
Floor 2 Posted 2007-03-11 02:04 ·  中国 广东 电信
荣誉版主
★★★★
batch fan
Credits 5,226
Posts 1,737
Joined 2006-03-10 00:38
20-year member
UID 51697
From 成都
Status Offline
Please change the title, OP, otherwise it will be moved directly to the recycle bin.
尺有所短,寸有所长,学好CMD没商量。
考虑问题复杂化,解决问题简洁化。
Floor 3 Posted 2007-03-11 02:07 ·  中国 浙江 绍兴 诸暨市 电信
高级用户
★★★
Autowalk
Credits 845
Posts 375
Joined 2007-03-03 01:58
19-year member
UID 80606
Gender Male
Status Offline
This title already explains the problem. Although it has nothing to do with BAT, it's still fine to bring it out here for everyone to discuss.
Floor 4 Posted 2007-03-11 02:27 ·  中国 新疆 喀什地区 电信
初级用户
Credits 28
Posts 12
Joined 2007-03-08 14:00
19-year member
UID 81093
Gender Male
Status Offline
Do you have your custom drive icon C.ico?
You can refer to http://lancao.blogdriver.com/lancao/1162271.html

[ Last edited by zhaoxianqunks on 2007-3-10 at 01:29 PM ]
Floor 5 Posted 2007-03-11 02:29 ·  中国 浙江 绍兴 诸暨市 电信
高级用户
★★★
Autowalk
Credits 845
Posts 375
Joined 2007-03-03 01:58
19-year member
UID 80606
Gender Male
Status Offline
Yes, I do. The icon can be displayed, it's just that open=setup.exe won't run.
Floor 6 Posted 2007-03-11 03:03 ·  中国 辽宁 本溪 联通
银牌会员
★★★
Credits 1,212
Posts 464
Joined 2006-12-13 21:11
19-year member
UID 73417
Gender Male
Status Offline
AutoPlay has been disabled.
Floor 7 Posted 2007-03-11 07:26 ·  中国 浙江 绍兴 诸暨市 电信
高级用户
★★★
Autowalk
Credits 845
Posts 375
Joined 2007-03-03 01:58
19-year member
UID 80606
Gender Male
Status Offline
Can the poster above say how to turn this feature on?
Floor 8 Posted 2007-03-11 07:32 ·  中国 广东 广州 越秀区 电信
中级用户
★★
Credits 251
Posts 108
Joined 2007-01-07 11:33
19-year member
UID 75721
Gender Male
From 湖南==>广州
Status Offline
You need to add something in the registry...
DOS新人.多多指導
Floor 9 Posted 2007-03-11 12:27 ·  中国 山西 运城 电信
中级用户
★★
Credits 241
Posts 131
Joined 2005-09-28 19:01
20-year member
UID 42920
Gender Male
Status Offline
You don't have to edit the registry
In GPEDITV.msc, find
Disable CD AutoPlay, and disable that option
房东说:这娃是个好孩子!
Floor 10 Posted 2007-03-11 12:32 ·  中国 浙江 绍兴 诸暨市 电信
高级用户
★★★
Autowalk
Credits 845
Posts 375
Joined 2007-03-03 01:58
19-year member
UID 80606
Gender Male
Status Offline
Where do I open GPEDITV.msc? I can't find it.
Floor 11 Posted 2007-03-11 13:31 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline
Originally posted by zhoushijay at 2007-3-10 23:32:
GPEDITV.msc Where do I open it? I can't find it.


  It should be a typo, I think it should be the Group Policy editor: GpEdit.msc
Forum Jump: