Hi
On my stick I have a portable program and a portable browser.
Is there a way to write a batch file which will change the default browser to the one on my stick, call the portable program, and upon exit of the portable program, change the default browser to what it was before the change?
Thanks
Windows XP SP2
Temporarily change default browser
Moderator: DosItHelp
Re: Temporarily change default browser
I can't help you much here because programmatically changing the default browser isn't possible on Win 10 anymore.
I remember that it was possible on XP by changing and creating registry values. I also remember that different browsers created different registry keys and values. So I'm afraid if you don't find all of those registry settings for your certain browser in the internet you have to compare the registry before and after setting the browser as default by hand.
Steffen
I remember that it was possible on XP by changing and creating registry values. I also remember that different browsers created different registry keys and values. So I'm afraid if you don't find all of those registry settings for your certain browser in the internet you have to compare the registry before and after setting the browser as default by hand.
Steffen
Temporarily change default browser
Suppose there is a way to do it in registry.
Don' I have to reboot in order for the change to take effect?
Don' I have to reboot in order for the change to take effect?
Re: Temporarily change default browser
It depends on where you have to do the registry updates. Changes in HKLM may require a reboot.
Steffen
Steffen
Re: Temporarily change default browser
The keys you are looking for are;
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\HTTP\shell\open\command]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\https\shell\open\command]
[HKEY_CURRENT_USER\Software\Classes\http\shell\open\command]
[HKEY_CURRENT_USER\Software\Classes\https\shell\open\command]
Any browser that wants to set itself as the default program for opening http or https connections needs to register itself here.
File associations are not affected.
restoreDefaultBrowser.reg
removeDefaultBrowser.reg
Changes take effect immediately, no reboot is required.
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\HTTP\shell\open\command]
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\https\shell\open\command]
[HKEY_CURRENT_USER\Software\Classes\http\shell\open\command]
[HKEY_CURRENT_USER\Software\Classes\https\shell\open\command]
Any browser that wants to set itself as the default program for opening http or https connections needs to register itself here.
File associations are not affected.
restoreDefaultBrowser.reg
Code: Select all
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\HTTP\shell\open\command]
@="\"D:\\IE\\browser\\Firefox v3.6.12-en-US\\firefox.exe\" -osint -url \"%1\""
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\https\shell\open\command]
@="\"D:\\IE\\browser\\Firefox v3.6.12-en-US\\firefox.exe\" -osint -url \"%1\""
[HKEY_CURRENT_USER\Software\Classes\http\shell\open\command]
@="\"D:\\IE\\browser\\Firefox v3.6.12-en-US\\firefox.exe\" -osint -url \"%1\""
[HKEY_CURRENT_USER\Software\Classes\https\shell\open\command]
@="\"D:\\IE\\browser\\Firefox v3.6.12-en-US\\firefox.exe\" -osint -url \"%1\""
Code: Select all
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\HTTP\shell\open\command]
@=""
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\https\shell\open\command]
@=""
[HKEY_CURRENT_USER\Software\Classes\http\shell\open\command]
@=""
[HKEY_CURRENT_USER\Software\Classes\https\shell\open\command]
@=""