Click here to Skip to main content
15,879,326 members
Articles / Programming Languages / C#

Implement an Autoplay Handler

Rate me:
Please Sign up or sign in to vote.
5.00/5 (22 votes)
18 Sep 2006CPOL8 min read 117.3K   1.7K   78  
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)


Written By
Canada Canada
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions