CD AutoRun basics光盘AutoRun基本
AutoRun runs a program when a CD is inserted into a Windows computer - see below for advice on Apple Macs.自动运行一个程序时,裁谈会是插入到Windows电脑上-见下文的意见,苹果互委会。
If Windows finds a (plain text) file called AUTORUN.INF in the root directory of a CD then it follows the instructions in this file to run a program.如果Windows发现(纯文字)所谓的Autorun.inf文件在根目录的CD ,然后它遵循指示,在此文件中运行程序。 This example AUTORUN.INF file tells Windows to run program setup.exe (from the root directory of the CD):这个例子告诉Autorun.inf文件运行Windows程序的Setup.exe (从根目录的CD ) :
[autorun] [自动]
open=setup.exe开放的Setup.exe =
icon=snazzie.ico图标= snazzie.ico
Use the Windows Notepad application to edit plain text files (it is in the Start All Programs Accessories menu).使用Windows记事本的应用编辑纯文本文件(这是在开始所有程序附件菜单) 。
Your CD users may have switched off AutoRun.您的CD用户可有关掉自动运行。 This might be because they are concerned about viruses.这可能是因为他们关心的病毒。 Also, if they press the Shift key down while inserting the CD, AutoRun is disabled.此外,如果他们按下Shift键,同时插入的CD , Autorun的残疾人士。 In Windows NT4, 2000 and XP systems, only Administrators and Power Users can use AutoRun.在Windows NT4 , 2000年和XP系统,只有系统管理员和电力用户可以使用自动运行。
There is no way to force your users to use AutoRun.有没有办法强迫用户使用自动运行。 It is therefore good practice to provide instructions so that users know how to start your CD, eg tell them to open file index.htm in their browser.因此,这是好的做法,以提供指示,让使用者知道如何开始您的CD ,例如告诉他们,打开文件index.htm在他们的浏览器。 These instructions are also required if your CD might be viewed by non-Windows users.这些指示还要求如果您的CD可能被非Windows用户。
So why is ShellRun needed?那么,为何是shellrun需要?
Until recently, it was not possible for Windows to AutoRun a file rather than a program.直到最近,人们不可能将Windows的自动运行文件,而不是一个计划。
OK, that’s not strictly true: you could use the following AUTORUN.INF to show web page index.htm确定,这不是严格的真实:您可以使用下列的Autorun.inf显示网页index.htm
[autorun] [自动]
open=start index.htm开放=开始index.htm
However, if you do this, Windows displays a DOS box briefly, which looks nasty.不过,如果你这样做, Windows会显示DOS的方块简单来说,显得污秽。 (And start might not be available on some systems.) (开始可能无法提供在某些系统上) 。
If you are only targeting recent Windows systems, then you can use the shellexecute command to open a file without a flickering DOS box:如果你是只针对最新的Windows系统,那么您可以使用shellexecute命令来打开一个文件没有一个闪烁之框:
[autorun] [自动]
shellexecute=index.htm shellexecute = index.htm
What does ShellRun do then?什么shellrun怎样做呢?
ShellRun overcomes the above problems. shellrun克服了上述问题。 It shows your file and displays a neat popup window.它表明您的文件并显示一个干净弹出式窗口。 The popup appears straight away so that the user knows that something is happening.弹出似乎直远离,让使用者知道,一些正在发生的事情。 ShellRun works in all Windows systems. shellrun工程,在所有的Windows系统。
This example AUTORUN.INF tells ShellRun to show web page index.htm while displaying message “Starting CD now…” in the ShellRun popup window.这个例子的Autorun.inf告诉shellrun显示网页index.htm ,而显示的讯息“开始,裁谈会现在… … ” ,在shellrun弹出式窗口。
[autorun] [自动]
open=ShellRun.exe index.htm Starting CD now…开放= shellrun.exe index.htm开始,裁谈会现在…
Do not forget to put ShellRun.exe in the root directory of your CD along with AUTORUN.INF.不要忘记把shellrun.exe在根目录下您的CD随的Autorun.inf 。
Viewer Technicalities观众的技术性问题
All the above AutoRun examples, including ShellRun, use the same core technique to display a file.上述所有Autorun的例子,包括shellrun ,使用相同的核心技术,以显示文件。
Windows associates a viewer program with each file type.在Windows同伙检视程序与每个类型的文件。 For .HTM and .HTML web pages, the viewer program will be your default browser.为与。 htm和。 HTML网页,查看计划将成为您的默认浏览器。
If a user does not have a viewer for your file type then it cannot be displayed until a viewer is installed.如果用户没有一个观众,为您的文件类型,然后它无法显示,直到Viewer是安装。 For example, if you are trying to show a PDF file, the user must have Adobe™ Acrobat Reader or equivalent installed.例如,如果您正试图查看PDF文件,用户必须有Adobe ™ Acrobat Reader或相等于安装。
If a viewer is not available, the freeware version of ShellRun just displays a message.如果观众是不具备, Freeware版本的shellrun只是显示一个讯息。 In retail version you can prompt the user to run a viewer installation program.在零售版,您可以提示用户来说,观众的安装程序。 See the Viewers page for more details.看到观众的网页,了解更多详情。
If you have a viewer program available then put its installation program on your CD - if you are allowed to distribute it.如果您有一个观众程序可用,然后付诸表决,其安装程序对您的CD -如果您允许分发。 To distribute Adobe™ Acrobat Reader, see here: Adobe Acrobat Reader - Download Adobe Acrobat Reader for distribution.分发™的Adobe Acrobat Reader软件阅览,在这里看到:使用Adobe Acrobat Reader -下载A dobeA crobatR eader以供分发。
Enabling AutoRun on your computer使自动在您的计算机上
To test AutoRun you need to have it enabled on your computer.测试自动执行,您需要拥有它您的计算机上启用。 A registry setting can be used to disable AutoRun.注册表设置,可以用来禁用自动运行。 Click Start Run then type in regedit.单击开始运行,然后键入在regedit 。 Select Edit Find and type in NoDriveTypeAutoRun.选择编辑查找和类型在nodrivetypeautorun 。 This value should be found in this key: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer .这个值应该发现,在这项: HKEY_CURRENT_USER \软件\微软\的Windows \ currentversion \政策\总管。
The NoDriveTypeAutoRun value should be hexadecimal 95 if AutoRun is enabled on all CDs, or B5 if disabled for CDs.该nodrivetypeautorun值应该是十六进制95 ,如果启用了自动对所有的CD ,或B5的,如果残疾人士的CD 。 (If you want to test AutoRun on a floppy disk, set this value to 91.) You may need to change more than one instance of NoDriveTypeAutoRun in the registry. (如果您想要测试自动对软盘,将此值设置为91 。 )您可能需要变更的多个实例nodrivetypeautorun在注册表中。 You usually need to reboot for a new value to take effect.你通常需要重新启动一个新的价值,才能生效。
In Windows 95/98/Me the NoDriveTypeAutoRun value is displayed as 95 00 00 00.在Windows 95/98/Me的该nodrivetypeautorun值是显示95 00 00 00 。 In Windows NT4, 2000 and XP this value is displayed as 0×00000095 or hexadecimal 95.在Windows NT4 , 2000年和XP的这个值是显示为0 × 00000095或十六进制95 。 If you modify the NoDriveTypeAutoRun value make sure it is still in the correct format.如果您修改nodrivetypeautorun价值,确保它仍然是在以正确的格式。