src/Microsoft/Windows/ComponentObjectModel/Shell/_Library/ShellExtensionManager.cs
/// <summary>
/// Test, if a shell extension is approved.
/// </summary>
/// <param name="clsid">The clsid of the shell extension.</param>
/// <returns></returns>
Test, if a shell extension is approved.
Test if a shell extension is approved .
public bool IsApproved( string clsid ) {
            using( IRegistryKey hiveKey = _registry.OpenBaseKey( RegistryHive.LocalMachine, RegistryView.Default ) ) {
                using( IRegistryKey approvedKey = hiveKey.OpenSubKey( @"Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" ) ) {
                    string approvedClsidValue = approvedKey.GetString( clsid );
                    return approvedClsidValue != null;  
                }
            }
        }
public bool IsApproved ( string clsid ) { using ( IRegistryKey hiveKey = _registry . OpenBaseKey ( RegistryHive . LocalMachine , RegistryView . Default ) ) { using ( IRegistryKey approvedKey = hiveKey . OpenSubKey ( @"Software\Microsoft\Windows\CurrentVersion\Shell Extensions\Approved" ) ) { string approvedClsidValue = approvedKey . GetString ( clsid ) ; return approvedClsidValue != null ; } } }
Test, if a shell extension is approved.
Test if a shell extension is approved .
// Test for null means, is there any value within Registry or is the value missing
None
clsid
string
The clsid of the shell extension.
The clsid of the shell extension .