Skip to content
⌘ NSIS Forum Archive

Detecting Default Browser

2 posts

MikeInVancouver#

Detecting Default Browser

Is it possible to detect the users default web browser from a NSIS script?

Thanks in advance,

Mike
Joel#
Yes!
You can

Name "defBrow"
OutFile "defBrow.exe"
ShowInstDetails show
XPStyle on

Function .onInit
InitPluginsDir
FunctionEnd

Section
FileOpen $0 "$PLUGINSDIR\dummy.htm" "w"
FileClose $0
System::Call "Shell32::FindExecutable(t '$PLUGINSDIR\dummy.htm', i 0, t .r1)"
DetailPrint "Your Default Browser is:"
DetailPrint $1
SectionEnd
You can later parse the executable to see if is IE, or FF or Opera, etc...