Is there a way for using a batch file to find the default browser on my computer?
This code will set the Environment variable browser
to FirefoxURL
which gives you a good indicator:
@ECHO OFF
REG QUERY HKCU\Software\Microsoft\Windows\Shell\Associations\UrlAssociations\http\UserChoice > browser.txt
FOR /F "skip=2 tokens=*" %%G IN (browser.txt) DO ( SET browser=%%G )
SET browser=%browser:~20%
ECHO Is: %browser%
It works by querying the registry to a text file then skipping the first two lines (useless for your purposes), then taking the text that starts at the 20th character of te remaining line. Which gives you FirefoxURL