title speaks it all.
for the windows 7 pc you need to change registry key for the
HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\ Associations\UrlAssociations\http
you can change that using c#
RegistryKey regkey = Registry.CurrentUser.OpenSubKey("SOFTWARE\\Microsoft\\Windows\\shell\\Associations\\UrlAssociations\\http\\UserChoice", true);
string browser = regkey.GetValue("Progid").ToString();
if (browser != "IE.HTTP")
{
regkey.SetValue("Progid", "IE.HTTP");
}
for prior to vista os - (checked in windows XP)
RegistryKey regkey = Registry.ClassesRoot.OpenSubKey("http\\shell\\open\\command", true);
string browser = regkey.GetValue(null).ToString().ToLower().Replace("\"", "");
string defBrowser = "";
if (!browser.EndsWith("exe"))
{
//get rid of everything after the ".exe"
browser = browser.Substring(0, browser.LastIndexOf(".exe") + 4);
defBrowser = browser.Substring(browser.LastIndexOf("\\") + 1);
}
if (defBrowser != "iexplore")
{
Process.Start("IExplore.exe");
ScreenScraperEngine.Instance.Wait(2000);
string iepath = "";
foreach (Process p in Process.GetProcesses())
{
if (p.ProcessName == "IEXPLORE")
{
iepath = p.MainModule.FileName;
}
}
if (iepath != "")
{
string iepathval = "\"" + iepath + "\" -nohome";
regkey.SetValue(null, iepathval);
}
}