一般来说,当不是本地管理员组成员的登录用户调用自动运行时,可能会显示“安装失败”消息(在 Vista 上,您可能需要右键单击 autorun.inf并选择“以管理员身份运行”)。
此外,这里有几个链接,其中包含有关自动运行的一般信息(以及“NoDriveTypeAutoRun”注册表项
为您使用 Microsoft Visual Studio .NET 创建的应用程序创建自动运行 CD-ROM:-
步骤是
1) Start Visual Studio .NET.
2) Create a simple Console Application or Windows Application.
3) Build the application.
4) On the File menu, point to New, and then click Project.
5) In Project Types, click Setup and Deployment Projects. In Templates, click Setup projects
6) Name the project Setup, and then click OK.
7) In Solution Explorer, right-click your Setup project, click Add, and then click File.
8) 在“文件名”文本框中,键入您在步骤 3 中构建的可执行文件的绝对路径,然后单击“打开”。
9) 在构建菜单上,单击构建解决方案。
10) 启动任何文本编辑器(如记事本)。
Paste the following code in the text editor, and then save the file as Autorun.inf:
[autorun]
open=Setup.exe
注意:- 要为您在步骤 3 中构建的 Visual Studio .NET 应用程序准备 Autorun CD-ROM,请将步骤 9 中生成的文件和您在步骤 11 中创建的 Autorun.inf 文件复制到光盘。