中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-03 20:25
48,038 topics / 350,123 posts / today 0 new / 48,251 members
DOS批处理 & 脚本技术(批处理室) » Problem with using the autorun.inf file on a USB flash drive to enable AutoPlay
Printable Version  1,159 / 10
Floor1 zhoushijay Posted 2007-03-11 01:58
高级用户 Posts 375 Credits 845
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 ]
Floor2 namejm Posted 2007-03-11 02:04
荣誉版主 Posts 1,737 Credits 5,226 From 成都
Please change the title, OP, otherwise it will be moved directly to the recycle bin.
Floor3 zhoushijay Posted 2007-03-11 02:07
高级用户 Posts 375 Credits 845
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.
Floor4 zhaoxianqunks Posted 2007-03-11 02:27
初级用户 Posts 12 Credits 28
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 ]
Floor5 zhoushijay Posted 2007-03-11 02:29
高级用户 Posts 375 Credits 845
Yes, I do. The icon can be displayed, it's just that open=setup.exe won't run.
Floor6 jmz573515 Posted 2007-03-11 03:03
银牌会员 Posts 464 Credits 1,212
AutoPlay has been disabled.
Floor7 zhoushijay Posted 2007-03-11 07:26
高级用户 Posts 375 Credits 845
Can the poster above say how to turn this feature on?
Floor8 Eblis Posted 2007-03-11 07:32
中级用户 Posts 108 Credits 251 From 湖南==>广州
You need to add something in the registry...
Floor9 maya0su Posted 2007-03-11 12:27
中级用户 Posts 131 Credits 241
You don't have to edit the registry
In GPEDITV.msc, find
Disable CD AutoPlay, and disable that option
Floor10 zhoushijay Posted 2007-03-11 12:32
高级用户 Posts 375 Credits 845
Where do I open GPEDITV.msc? I can't find it.
Floor11 lxmxn Posted 2007-03-11 13:31
版主 Posts 4,938 Credits 11,386
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
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023