End Google Ads 201810 - BS.net 01 -->
I had a bho application developed in Vs2005 c#, I had made an msi setup, when I was trying to install
the setup, it is successfully getting installed, but the dll does not gets injected in the registry.
Why?
The registry path is "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Browser Helper Objects"
But this is succesfully injected in other Pc's
The .Net framework2.0 is present in all PC's
Code for registering and unregistering:
public static string BHOKEYNAME = "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Browser
Helper Objects";
[ComRegisterFunction]
public static void RegisterBHO(Type type)
{
RegistryKey key = Registry.LocalMachine.OpenSubKey(BHOKEYNAME, true);
if (key == null)
{
key = Registry.LocalMachine.CreateSubKey(BHOKEYNAME);
}
string guidString = type.GUID.ToString("B");
RegistryKey bhoKey = key.OpenSubKey(guidString, true);
if (bhoKey == null)
{
bhoKey = key.CreateSubKey(guidString);
}
// NoExplorer:dword = 1 prevents the BHO to be loaded by Explorer
string _name = "NoExplorer";
object _value = (object)1;
bhoKey.SetValue(_name, _value);
key.Close();
bhoKey.Close();
}
[ComUnregisterFunction]
public static void UnregisterBHO(Type type)
{
RegistryKey registryKey = Registry.LocalMachine.OpenSubKey(BHOKEYNAME, true);
string guid = type.GUID.ToString("B");
if (registryKey != null)
registryKey.DeleteSubKey(guid, false);
}
In some PC's the dll gets registered and in some PC's dll doe not gets registered
مواقع النشر (المفضلة)