|
|
#1 |
|
Junior Member
Join Date: Jan 2006
Posts: 2
|
Detect browser script
I am learning to use NSIS. Based on some wiki information I put together the following script. However, the StrCmp lines are not working. I'm sure it's something wrong with my syntax. Any help would be appreciated.
Outfile "detectbrowser.exe" ShowInstDetails show Section "Detect default browser" ReadRegStr $R3 HKCR ".htm" "" ReadRegStr $R4 HKCR "$R3\shell" "" ReadRegStr $R3 HKCR "$R3\shell\$R4\command" "" Pop $R3 ;Get the return value DetailPrint "Default Browser" DetailPrint "$R3" StrCmp $R3 iexplore.exe 0 +2 DetailPrint "Default Browser: IE" StrCmp $R3 firefox.exe 0 skip DetailPrint "Default Browser: Firefox" skip: SectionEnd thanks, Luis |
|
|
|
|
|
#2 |
|
Forum King
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
|
When you Pop you get from the stack the return value that a plugin or function has pushed (Push) to the stack
![]() The way you use to read the registry is also wrong, at least regarding to my registry, should be: Still you need to process the string if you want export browser's name.code: Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS |
|
|
|
|
|
#3 | |
|
Junior Member
Join Date: Jan 2006
Posts: 2
|
Quote:
code: However, how can I tell if "iexplore.exe" is contained in the $RO variable? thanks, Luis |
|
|
|
|
|
|
#4 | ||
|
Forum King
Join Date: Mar 2006
Location: Ath. GR
Posts: 2,078
|
Quote:
Quote:
Quick AVI Creator - Quick and easy convert from DVD/MPEG/AVI/MKV to AVI/MP4/MKV Quick AVI Creator entirely edited with NSIS and entirely upgraded to Unicode NSIS |
||
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|