I have trouble detecting the default browser on Win 8.1 Pro, but it goes the same for Win 8 also.
I have a script that worked just fine on Win 7:
This doesn't work on Windows above Win 7.FileOpen $0 "$PLUGINSDIR\dummy.htm" "w"
FileClose $0
System::Call "Shell32::FindExecutable(t '$PLUGINSDIR\dummy.htm', i 0, t .r1)"
${StrLoc} $0 $1 "chrome.exe" ">"
${If} $0 == ""
${StrLoc} $0 $1 "firefox.exe" ">"
${If} $0 == ""
${StrLoc} $0 $1 "iexplore.exe" ">"
${If} $0 == ""
StrCpy $BR "00"
${Else}
StrCpy $BR "IE"
${EndIf}
${Else}
StrCpy $BR "FF"
${EndIf}
${Else}
StrCpy $BR "CH"
${EndIf}
After this command:
on Win 7 I can print $1 and get: "C:\Program Files\Internet Explorer\iexplore.exe"System::Call "Shell32::FindExecutable(t '$PLUGINSDIR\dummy.htm', i 0, t .r1)"
but for some reason, on Win 8.1, I get: "C:\Windows\system32\OpenWith.exe" and I always get BR = "00", meaning that some other browser (other than GC, FF, IE) is the default browser.
Do you have any instructions, or code samples, that could help me overcome this Win 8 issue?
Best,
Stefan