Go Back   TechArena Community > Software > Windows Software
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Sponsored Links



Internet Explorer's Restrict Sites via c#

Windows Software


Reply
 
Thread Tools Search this Thread
  #1  
Old 27-07-2009
Member
 
Join Date: Jan 2009
Posts: 163
Internet Explorer's Restrict Sites via c#
  

Hi friends,

I would like to learn how to add/remove/list sites in IE's restricted site list through a c# application.or any inputs in order to accomplish this?I can see the changes it makes in the registry but i would rather not be changing it directly.Any thoughts...

thanks goes for any help as always !!

Reply With Quote
  #2  
Old 27-07-2009
Member
 
Join Date: Apr 2008
Posts: 2,001
Re: Internet Explorer's Restrict Sites via c#

Curbing web browsing can prevent children from accessing dangerous content on the internet, or having to make judgment calls over suitable relationships in chat-rooms. you can do it in C#, but am not much in to it,any way i can provide some inputs
using System.IO;
using System;
using Microsoft.Win32;
using System.Security.Permissions;
string strRemotePC = "myMachineName";
RegistryKey environmentKey = RegistryKey.OpenRemoteBaseKey(
RegistryHive.CurrentUser, strRemotePC).OpenSubKey(
@"HKEY_CURRENT_USER\Printers\Connections");
Reply With Quote
  #3  
Old 27-07-2009
Member
 
Join Date: May 2008
Posts: 2,008
Re: Internet Explorer's Restrict Sites via c#

Microsoft has some security protections to prevent direct access to an input field of type file.so that's the problem. The most common solution I?ve come across is to either just click the browse button, which fails if you are trying to automatically fill something in, or to use Send Keys, which fails if the user doesn?t have focus on the application at the moment.It's as though he willfully wants to disregard help. I suspect he just wants us to give him the full code, and I'm sick and tired of seeing a variation of the same post from him.look at this codes for the time being
string strRemotePC = "myMachineName";

RegistryKey CURRENT_USER_Key_Printers = RegistryKey.OpenRemoteBaseKey(
RegistryHive.CurrentUser, strRemotePC).OpenSubKey(
@"Printers");
//HKEY_CURRENT_USER\Printers\Connections
foreach (string subKeyName in CURRENT_USER_Key_Printers.GetSubKeyNames())
{
if (subKeyName.ToLower().Trim() == "connections")
{
using (RegistryKey tempKey = CURRENT_USER_Key_Printers.OpenSubKey(subKeyName))
{
Console.WriteLine("\nThere are {0} values for {1}.",
tempKey.ValueCount.ToString(), tempKey.Name);
foreach (string valueName in tempKey.GetValueNames())
{
Console.WriteLine("{0,-8}: {1}", valueName,
tempKey.GetValue(valueName).ToString());
}
}
}
}
Reply With Quote
Reply

  TechArena Community > Software > Windows Software
Tags: ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "Internet Explorer's Restrict Sites via c#"
Thread Thread Starter Forum Replies Last Post
Are google sites ban on internet explorer 11 1bal Technology & Internet 3 12-09-2013 11:12 AM
some of the sites are not opening in internet explorer-9 ZewrI Technology & Internet 4 15-03-2011 06:28 AM
How to disable suggested sites From Internet Explorer 8? REDBULL Technology & Internet 4 27-01-2010 09:01 PM
Restrict Internet Explorer?s Accessibility Settings changes rajmalhotra Operating Systems 3 05-06-2009 11:27 PM
Internet Explorer shuts down on some sites Psycrow Operating Systems 1 30-12-2008 08:39 AM


All times are GMT +5.5. The time now is 04:31 AM.