Default Browser
Moderators: Dorian (MJT support), JRL
Default Browser
Can anyone tell me, if there is some script to find out what is the default browser?
Re: Default Browser
Never MindJoejr wrote:Can anyone tell me, if there is some script to find out what is the default browser?
For those who are interested
Code: Select all
RegistryReadKey>HKEY_CURRENT_USER,Software\Classes\http\shell\open\ddeexec\Application,,strValue
- Marcus Tettmar
- Site Admin
- Posts: 7395
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
Another way is to use the FindExecutable function which returns the executable associated with a file type. We can ask it to tell us what is associated with .htm files:
Code: Select all
WriteLn>%TEMP_DIR%\temp.htm,r,nothing
LibFunc>shell32,FindExecutableA,fexeResult,%TEMP_DIR%\temp.htm,0,res
Position>NULLCHAR,fexeResult_3,1,pNull
MidStr>fexeResult_3,1,{%pNull%-1},defBrowserExe
Separate>defBrowserExe,\,pathParts
Let>defBrowserExe=pathParts_%pathParts_count%
DeleteFile>%TEMP_DIR%\temp.htm
MessageModal>Default Browser: %defBrowserExe%
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
RE:Default Browser
What if i wanted the browser version also?mtettmar wrote:Another way is to use the FindExecutable function which returns the executable associated with a file type. We can ask it to tell us what is associated with .htm files:
Code: Select all
WriteLn>%TEMP_DIR%\temp.htm,r,nothing LibFunc>shell32,FindExecutableA,fexeResult,%TEMP_DIR%\temp.htm,0,res Position>NULLCHAR,fexeResult_3,1,pNull MidStr>fexeResult_3,1,{%pNull%-1},defBrowserExe Separate>defBrowserExe,\,pathParts Let>defBrowserExe=pathParts_%pathParts_count% DeleteFile>%TEMP_DIR%\temp.htm MessageModal>Default Browser: %defBrowserExe%