How to Set Internet Explorer as Default Browser Via Batch File

 
Thanks to MSDN Blogger, Akshay, for writting a batch file that (re)sets Microsoft’s Internet Explorer as the default browser.
:: .htm extension
reg add "HKCUSoftwareClasses.htm" /t REG_SZ /d "htmlfile" /f
:: .html extension
reg add "HKCUSoftwareClasses.html" /t REG_SZ /d "htmlfile" /f
:: http shell
reg add "HKCUSoftwareClasseshttpshellopencommand" /t REG_SZ /d ""C:Program FilesInternet ExplorerIEXPLORE.EXE" -nohome" /f
:: ftp shell
reg add "HKCUSoftwareClassesftpshellopencommand" /t REG_SZ /d ""C:Program FilesInternet ExplorerIEXPLORE.EXE" %%1" /f
:: https shell
reg add "HKCUSoftwareClasseshttpsshellopencommand" /t REG_SZ /d ""C:Program FilesInternet ExplorerIEXPLORE.EXE" -nohome" /f
:: http class
reg delete "HKCUSoftwareClasseshttpDefaultIcon" /f
reg add "HKCUSoftwareClasseshttpDefaultIcon" /t REG_EXPAND_SZ /d "%%SystemRoot%%system32url.dll,0" /f
:: ftp class
reg delete "HKCUSoftwareClassesftpDefaultIcon" /f
reg add "HKCUSoftwareClassesftpDefaultIcon" /t REG_EXPAND_SZ /d "%%SystemRoot%%system32url.dll,0" /f
:: https class
reg delete "HKCUSoftwareClasseshttpsDefaultIcon" /f
reg add "HKCUSoftwareClasseshttpsDefaultIcon" /t REG_EXPAND_SZ /d "%%SystemRoot%%system32url.dll,0" /f
:: ddeexec keys
reg add "HKCUSoftwareClasseshttpshellopenddeexec" /t REG_SZ /d ""%%1",,-1,0,,,," /f
reg add "HKCUSoftwareClassesftpshellopenddeexec" /t REG_SZ /d ""%%1",,-1,0,,,," /f
reg add "HKCUSoftwareClasseshttpsshellopenddeexec" /t REG_SZ /d ""%%1",,-1,0,,,," /f
:: StartMenuInternet key
reg delete "HKCUSoftwareClientsStartMenuInternet" /ve /f
reg add "HKLMSoftwareClientsStartMenuInternet" /t REG_SZ /d "IEXPLORE.EXE" /f
:: ddeexec app keys
reg add "HKCRHTTPshellopenddeexecApplication" /t REG_SZ /d "IExplore" /f
reg add "HKCRHTTPSshellopenddeexecApplication" /t REG_SZ /d "IExplore" /f
reg add "HKCRFTPshellopenddeexecApplication" /t REG_SZ /d "IExplore" /f
reg add "HKCRhtmlfileshellopenddeexecApplication" /t REG_SZ /d "IExplore" /f
reg add "HKCRhtmlfileshellopennewddeexecApplication" /t REG_SZ /d "IExplore" /f
reg add "HKCRmhtmlfileshellopenddeexecApplication" /t REG_SZ /d "IExplore" /f
reg add "HKCRmhtmlfileshellopennewddeexecApplication" /t REG_SZ /d "IExplore" /f
:: ifexec keys
reg add "HKLMSOFTWAREClassesftpshellopenddeexecifExec" /t REG_SZ /d "*" /f
 
 
About these ads

About blakehandler

BLAKE is a Microsoft MVP and award winning programmer with over 20 years experience providing complete Windows and networking support for small to medium sized businesses. BLAKE was also a Personal Technology Coach for residential clients on the Los Angeles West Side. BLAKE now works full-time for a major media company.
This entry was posted in Know Where Know-How. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s