Windows xp cd autoplay fix




















Autoplay uses DeviceHandlers to associate a device's events with an EventHandler. Here you can see the resulting structure in the registry:. Both of these values are provided either by the device at installation or by an application that wants to handle the events of a particular device or device type. Autoplay determines which DeviceHandler matches which device using a new feature of Windows XP that enables the association of miscellaneous properties to a device's PnP ID.

This is also the mechanism used by Windows XP to display a custom icon and label for volume devices in the My Computer folder and in other parts of the Windows UI. This topic is outside of the scope of this article, but you can refer to the Platform SDK documentation for more information on how to do this.

Canceling Autoplay To provide a better user experience, it may be necessary in some cases to prevent Windows from triggering Autoplay for a particular media type or device. For example, assume a user is listening to music files on his hard disk using some application. He then inserts an audio CD. In such a case, interrupting the music that's currently playing is probably not what the user expects.

For non-volume devices, let's assume that the user has indicated through the user interface that Application A is to handle video camera events. But for some reason the user prefers Application B for video editing. He opens Application B and begins editing some previously acquired video, then decides to add some newly acquired content to the video being edited. He invokes Application B's import function and is prompted to turn on the video camera to acquire the latest video content from the camera.

Usually this would trigger the launch of Application A, the user's preferred application for video camera events. Fortunately, Application B has cancelled Autoplay processing of video camera events while the user is editing video content. In this case, the cancellation of Autoplay processing by Application B has created a better user experience.

The purpose of Autoplay is not to provide a reaction to every single hardware event, but rather to help the user accomplish specific tasks related to hardware events of interest. When the software reaction would be disruptive to the current flow of work, or just plain annoying, Autoplay cancellation can be invoked.

Volume and non-volume Autoplay are cancelled in different ways. Furthermore, volume events can be cancelled using one of two methods depending on whether the application is in the foreground. Each one of these cases is explained next. Volume Autoplay Cancellation Since its first incarnation, Autoplay always provided a cancellation mechanism.

If the application wants to cancel Autoplay only when it's in the foreground, the application can listen to the QueryCancelAutoplay message. The component will be called whenever an event generates an Autoplay action. The code that is shown is extracted from Sample 3. See Figure 13 for the possible values defined in shobjidl. An application returns a similar bitmask indicating which Autoplay content types are not to be handled in response to this event. The values for these flags begin at two for backward compatibility reasons.

Prior to Windows XP, applications were required to return one if they wanted to cancel Autoplay. Sample 3 contains code to determine if the application is running on Windows XP or higher. The IQueryCancelAutoplay interface shown here is also defined in shobjidl. When applicable, the label and serial number of the media is provided to help the application decide if Autoplay should be canceled.

Obviously, this information is not available for blank CDs. Using the IQueryCancelAutoplay interface in this way can be especially useful to cancel Autoplay for the second or subsequent CD of a multiple CD setup program or game. As a side note, the QueryCancelAutoplay message cancellation mechanism can also be used for this purpose, since these applications are most often in the foreground when the user is required to insert the next CD.

If a failure code is returned, it is ignored and treated as if the application allows Autoplay. It is important to note that all applications are granted a three-second window in which to cancel Autoplay. Any cancellation query response received after this three-second period is ignored and Autoplay proceeds. This is necessary because Autoplay loses much of its value when the period between the triggering hardware event and the software response is too long.

Usability studies have demonstrated that users often try to launch an application manually when the period between the media insertion and the Autoplay action extends beyond five to seven seconds.

Unfortunately, the time delay due to hardware is already quite long on fast CD drives. Ironically, the faster the CD drive, the longer it takes to bring it up to its operating speed.

This does not leave much time to query the applications for cancellation requests. Therefore, applications should register for cancellation only when appropriate and return promptly from the AllowAutoplay call.

For backward compatibility, the Windows message mechanism is always used before the IQueryCancelAutoplay mechanism. Refer to Sample 3 for a typical implementation of this mechanism. Non-volume Autoplay Cancellation Non-volume Autoplay cancellation is similar to the volume Autoplay cancellation mechanism for non-foreground applications.

IHWEventHandler interface is defined in shobjidl. For the ROT's Register method call to succeed with this flag, the component being registered must have the correct security settings.

See the section Autoplay V2 Registration Mechanism earlier in this article for information on how to register the AppID information for a component. In contrast to when the interface is used to handle an event, the Initialize method will not be called before HandleEvent when the interface is used for event cancellation.

As with volume Autoplay cancellation, Windows allows only three seconds for applications to return from the HandleEvent call. A typical implementation of this cancel mechanism is provided in Sample 2. Autoplay Diagnostic Tools Two tools for download have been provided with the samples accompanying this article.

The first one, APDiag. The tool performs two tasks. First it sets the following registry value:. Guest opalsboy. Posted January 10, Download and install TweakUI. Run the program. Screen will open with many options for things. Close Tweak and you should be off and running. Guest ApplePie2luv. Posted May 7, Hey, So I've tried all these things and autoplay still won't turn on. Guest Brick T. Posted March 11, Thanks for he help sh1leshk4, changing the registry setting worked for me.

Guest Acemoser. Posted April 9, Join the conversation You can post now and register later. Reply to this topic Insert image from URL. Covert Ops. Internet Tools. Linux Distros. MajorGeeks Windows Tweaks. System Tools. Smart Defrag. K-Lite Mega Codec Pack. Networking Software. Trending from CNET. Download Now. Editors' Review Download. Autoplay Repair installs and uninstalls without issues. Full Specifications. What's new in version 2. Version 2. Some minor changes.

Release November 7, Date Added May 29, Operating Systems. NET Framework 2. Total Downloads 28, Downloads Last Week 0. Report Software.



0コメント

  • 1000 / 1000