1491
* Writes common registry values for a handler that DOES NOT use DDE using SHCTX.
1494
* The key name in relation to the HKCR root. SOFTWARE\Classes is
1495
* prefixed to this value when using SHCTX.
1497
* The path and args to launch the application.
1499
* The path to the binary that contains the icon group for the default icon
1500
* followed by a comma and either the icon group's resource index or the icon
1501
* group's resource id prefixed with a minus sign
1503
* The display name for the handler. If emtpy no value will be set.
1504
* @param _ISPROTOCOL
1505
* Sets protocol handler specific registry values when "true".
1507
* $R3 = storage for SOFTWARE\Classes
1508
* $R4 = string value of the current registry key path.
1515
!macro AddDisabledDDEHandlerValues
1517
!ifndef ${_MOZFUNC_UN}AddDisabledDDEHandlerValues
1519
!verbose ${_MOZFUNC_VERBOSE}
1520
!define ${_MOZFUNC_UN}AddDisabledDDEHandlerValues "!insertmacro ${_MOZFUNC_UN}AddDisabledDDEHandlerValuesCall"
1522
Function ${_MOZFUNC_UN}AddDisabledDDEHandlerValues
1523
Exch $R9 ; true if a protocol handler
1525
Exch $R8 ; FriendlyTypeName
1527
Exch $R7 ; icon index
1529
Exch $R6 ; shell\open\command
1533
Push $R3 ; base reg class
1535
StrCpy $R3 "SOFTWARE\Classes"
1536
StrCmp "$R8" "" +6 +1
1537
ReadRegStr $R4 SHCTX "$R5" "FriendlyTypeName"
1539
StrCmp "$R4" "" +1 +3
1540
WriteRegStr SHCTX "$R3\$R5" "" "$R8"
1541
WriteRegStr SHCTX "$R3\$R5" "FriendlyTypeName" "$R8"
1543
StrCmp "$R9" "true" +1 +2
1544
WriteRegStr SHCTX "$R3\$R5" "URL Protocol" ""
1546
ReadRegDWord $R4 SHCTX "$R3\$R5" "EditFlags"
1547
StrCmp $R4 "" +1 +3 ; Only add EditFlags if a value doesn't exist
1548
DeleteRegValue SHCTX "$R3\$R5" "EditFlags"
1549
WriteRegDWord SHCTX "$R3\$R5" "EditFlags" 0x00000002
1551
StrCmp "$R7" "" +2 +1
1552
WriteRegStr SHCTX "$R3\$R5\DefaultIcon" "" "$R7"
1554
; Main command handler for the app
1555
WriteRegStr SHCTX "$R3\$R5\shell\open\command" "" "$R6"
1557
; Drop support for DDE (bug 491947), and remove old dde entries if
1560
; Note, changes in SHCTX should propegate to hkey classes root when
1561
; current user or local machine entries are written. Windows will also
1562
; attempt to propegate entries when a handler is used. CR entries are a
1563
; combination of LM and CU, with CU taking priority.
1565
; To disable dde, an empty shell/ddeexec key must be created in current
1566
; user or local machine. Unfortunately, settings have various different
1567
; behaviors depending on the windows version. The following code attempts
1568
; to address these differences.
1570
; On XP (no SP, SP1, SP2), Vista: An empty default string
1571
; must be set under ddeexec. Empty strings propagate to CR.
1573
; Win7: IE does not configure ddeexec, so issues with left over ddeexec keys
1574
; in LM are reduced. We configure an empty ddeexec key with an empty default
1575
; string in CU to be sure.
1577
DeleteRegKey SHCTX "SOFTWARE\Classes\$R5\shell\open\ddeexec"
1578
WriteRegStr SHCTX "SOFTWARE\Classes\$R5\shell\open\ddeexec" "" ""
1599
!macro AddDisabledDDEHandlerValuesCall _KEY _VALOPEN _VALICON _DISPNAME _ISPROTOCOL
1601
!verbose ${_MOZFUNC_VERBOSE}
1606
Push "${_ISPROTOCOL}"
1607
Call AddDisabledDDEHandlerValues
1611
!macro un.AddDisabledDDEHandlerValuesCall _KEY _VALOPEN _VALICON _DISPNAME _ISPROTOCOL
1613
!verbose ${_MOZFUNC_VERBOSE}
1618
Push "${_ISPROTOCOL}"
1619
Call un.AddDisabledDDEHandlerValues
1623
!macro un.AddDisabledDDEHandlerValues
1624
!ifndef un.AddDisabledDDEHandlerValues
1626
!verbose ${_MOZFUNC_VERBOSE}
1628
!define _MOZFUNC_UN "un."
1630
!insertmacro AddDisabledDDEHandlerValues
1489
1639
################################################################################
1490
1640
# Macros for handling DLL registration