Click here to Skip to main content
12,446,146 members (48,952 online)
Click here to Skip to main content

Stats

80.4K views
1.5K downloads
78 bookmarked
Posted

Implement an Autoplay Handler

, 18 Sep 2006 CPOL
Implementing an Autoplay handler in C#.
HKCR
{
	ForceRemove %PROGID%.%VERSION% = s '%DESCRIPTION%'
	{
		CLSID = s '%CLSID%'
	}
	ForceRemove %PROGID% = s '%DESCRIPTION%'
	{
		CLSID = s '%CLSID%'
		CurVer = s '%PROGID%.%VERSION%'
		shell
		{
			%InvokeVerb%
			{
				DropTarget {
					val CLSID = s '%CLSID%'
				}
			}
		}
	}
}

HKLM {
	NoRemove Software
	{
		NoRemove Microsoft
		{
			NoRemove Windows
			{
				NoRemove CurrentVersion
				{
					NoRemove Explorer
					{
						NoRemove AutoplayHandlers
						{
							NoRemove EventHandlers
							{
								NoRemove ShowPicturesOnArrival
								{
									val %HANDLERNAME% = s ''
								}
							}
							NoRemove Handlers
							{
								ForceRemove %HANDLERNAME%
								{
									val Action = s '%Action%'
									val DefaultIcon = s '%MODULE%, %ICON%'
									val InvokeProgID = s '%PROGID%'
									val InvokeVerb = s '%InvokeVerb%'
									val Provider = s '%Provider%'
								}
							}
						}
					}
				}
			}
		}
	}
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Tim Almdal
Canada Canada
No Biography provided

You may also be interested in...

Pro
Pro
| Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.160811.3 | Last Updated 18 Sep 2006
Article Copyright 2006 by Tim Almdal
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid