public static void Unregister(Type t)
{
string guid = t.GUID.ToString("B");
BandObjectAttribute[] boa = (BandObjectAttribute[])t.GetCustomAttributes(
typeof(BandObjectAttribute),
false);
BandObjectStyle style = 0;
if (boa.Length == 1) style = boa[0].Style;
if (0 != (style & BandObjectStyle.ExplorerToolbar))
Registry.LocalMachine.CreateSubKey(@"SOFTWARE\Microsoft\Internet Explorer\Toolbar").DeleteValue(guid, false);
Registry.ClassesRoot.CreateSubKey(@"CLSID").DeleteSubKeyTree(guid);
}