Browse Source

b=563970, r=mfinkle, regprot.exe can damage Windows registry

matthew.gertner@gmail.com 14 years ago
parent
commit
0825864258
2 changed files with 9 additions and 5 deletions
  1. 8 4
      client/winbuild/regprot.nsi
  2. 1 1
      confvars.sh

+ 8 - 4
client/winbuild/regprot.nsi

@@ -21,9 +21,6 @@ IfErrors 0 +2
 GoTo autostart
 ${StrTok} $R2 $R1 "/" "0" "0"
 
-; Delete the existing entry for this protocol
-DeleteRegKey HKLM "SOFTWARE\Classes\$R2"
-
 ${GetOptions} $R0 "/Unregister" $R3
 IfErrors register +1
 GoTo finish
@@ -40,12 +37,19 @@ UAC::RunElevated
 ; Register our protocol keys
 WriteRegStr HKLM "SOFTWARE\Classes\$R2" "EditFlags" 2
 WriteRegStr HKLM "SOFTWARE\Classes\$R2" "URL Protocol" ""
-; WriteRegStr HKLM "SOFTWARE\Classes\$R2\DefaultIcon" "" "$\"$R3$\",1"
+WriteRegStr HKLM "SOFTWARE\Classes\$R2" "FriendlyTypeName" ""
+WriteRegStr HKLM "SOFTWARE\Classes\$R2\DefaultIcon" "" ""
 WriteRegStr HKLM "SOFTWARE\Classes\$R2\shell\open\command" "" "$\"$R3$\" -url $\"%1$\""
 WriteRegStr HKLM "SOFTWARE\Classes\$R2\shell\open\ddeexec" "" "$\"%1$\",,0,0,,,,"
 WriteRegStr HKLM "SOFTWARE\Classes\$R2\shell\open\ddeexec" "NoActivateHandler" ""
 WriteRegStr HKLM "SOFTWARE\Classes\$R2\shell\open\ddeexec\Application" "" "$R4"
 WriteRegStr HKLM "SOFTWARE\Classes\$R2\shell\open\ddeexec\Topic" "" "WWW_OpenURL"
+; The ifexec key may have been added by another application so try to
+; delete it to prevent it from breaking this app's shell integration.
+; Also, IE 6 and below doesn't remove this key when it sets itself as the
+; default handler and if this key exists IE's shell integration breaks.
+DeleteRegKey HKLM "SOFTWARE\Classes\$R2\shell\open\ddeexec\ifexec"
+DeleteRegKey HKCU "SOFTWARE\Classes\$R2\shell\open\ddeexec\ifexec"
 GoTo finish
 
 autostart:

+ 1 - 1
confvars.sh

@@ -38,7 +38,7 @@
 
 MOZ_APP_NAME=prism
 MOZ_APP_DISPLAYNAME=Prism
-MOZ_APP_VERSION=1.0b3
+MOZ_APP_VERSION=1.0b4
 
 MOZ_XUL_APP=1
 MOZ_UPDATER=1