static void RegistryIeContextMenu()
{
try
{
string regkey = @"Software\Microsoft\Internet Explorer\MenuExt\MyApp";
string scriptPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "geturl.htm");
RegistryKey root = Registry.CurrentUser.OpenSubKey(regkey);
if (null == root)
{
root = Registry.CurrentUser.CreateSubKey(regkey);
root.SetValue("", scriptPath, RegistryValueKind.String);
root.SetValue("Contsts", 0x00000022, RegistryValueKind.DWord);
}
WTRegedit("ok", scriptPath);
}
catch (Exception ex)
{
// DFApp.LogDebug(ex.ToString());
}
}
static void WTRegedit(string name, string tovalue)
{
RegistryKey hklm = Registry.CurrentUser;
RegistryKey software = hklm.OpenSubKey(@"Software\Microsoft\Internet Explorer\MenuExt", true);
RegistryKey aimdir = software.CreateSubKey("XXX");
aimdir.SetValue(name, tovalue);
}代码是从网上找的。然后不是很好用。 有的时候可以修改了注册表。但是 ie 的右击菜单里没有我注册的选项啊!! 是不是
和ie 的版本有问题。(我也装着火狐呢) 是不是有冲突 等待高手,,,
{
try
{
string regkey = @"Software\Microsoft\Internet Explorer\MenuExt\MyApp";
string scriptPath = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "geturl.htm");
RegistryKey root = Registry.CurrentUser.OpenSubKey(regkey);
if (null == root)
{
root = Registry.CurrentUser.CreateSubKey(regkey);
root.SetValue("", scriptPath, RegistryValueKind.String);
root.SetValue("Contsts", 0x00000022, RegistryValueKind.DWord);
}
WTRegedit("ok", scriptPath);
}
catch (Exception ex)
{
// DFApp.LogDebug(ex.ToString());
}
}
static void WTRegedit(string name, string tovalue)
{
RegistryKey hklm = Registry.CurrentUser;
RegistryKey software = hklm.OpenSubKey(@"Software\Microsoft\Internet Explorer\MenuExt", true);
RegistryKey aimdir = software.CreateSubKey("XXX");
aimdir.SetValue(name, tovalue);
}代码是从网上找的。然后不是很好用。 有的时候可以修改了注册表。但是 ie 的右击菜单里没有我注册的选项啊!! 是不是
和ie 的版本有问题。(我也装着火狐呢) 是不是有冲突 等待高手,,,
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货