src/Microsoft/Windows/ComponentObjectModel/Shell/_Library/ShellExtensionManager.cs
/// <summary>
/// Removes a shell extension from the list of approved extensions.
/// </summary>
/// <param name="clsid">The clsid of the shell extension.</param>
/// <remarks>
/// This call may fail, when invoking process has no administrative privileges or the process is not elevated.
/// </remarks>
Removes a shell extension from the list of approved extensions.
Removes a shell extension from the list of approved extensions .
public void RemoveApproval( string clsid ) {
            using( IRegistryKey hiveKey = _registry.OpenBaseKey( RegistryHive.LocalMachine, RegistryView.Default ) ) {
                using( IRegistryKey approvedKey = hiveKey.OpenSubKey( @"Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved", true ) ) {
                    approvedKey.DeleteValue( clsid, false );
                }
            }
        }
public void RemoveApproval ( string clsid ) { using ( IRegistryKey hiveKey = _registry . OpenBaseKey ( RegistryHive . LocalMachine , RegistryView . Default ) ) { using ( IRegistryKey approvedKey = hiveKey . OpenSubKey ( @"Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" , true ) ) { approvedKey . DeleteValue ( clsid , false ) ; } } }
Removes a shell extension from the list of approved extensions.
Removes a shell extension from the list of approved extensions .
// This may fail, if current user is not Admin AND/OR process is not elevated
clsid
string
The clsid of the shell extension.
The clsid of the shell extension .
remarks
This call may fail, when invoking process has no administrative privileges or the process is not elevated.
This call may fail when invoking process has no administrative privileges or the process is not elevated .