wolkow70,
Навскидку, принципиально, зачем такое нерациональное использование большого количества переменных?
Первоначальные значения переменных макросе не используются, а значит достаточно двух переменных..
читать дальше »
Код:
!macro UnRegisterExtension extenstion
Push $1
Push $2
;
StrCpy $ClassName "PotPlayerMini.${extenstion}"
;
ReadRegStr $1 HKLM "SOFTWARE\Classes\.${extenstion}" ""
StrCmp "$1" "$ClassName" 0 +2
DeleteRegValue HKLM "SOFTWARE\Classes\.${extenstion}" ""
DeleteRegKey HKLM "SOFTWARE\Classes\$ClassName"
;
StrCmp "$1" "$ClassName" 0 +2
ReadRegStr $2 HKLM "SOFTWARE\Classes\.${extenstion}" "DaumLiveBackup.bak"
DeleteRegValue HKLM "SOFTWARE\Classes\.${extenstion}" "DaumLiveBackup.bak"
WriteRegStr HKLM "SOFTWARE\Classes\.${extenstion}" "" "$2"
StrCmp "$2" "$ClassName" 0 +2
DeleteRegValue HKLM "SOFTWARE\Classes\.${extenstion}" ""
;
ReadRegStr $1 HKCU "Software\Classes\.${extenstion}" ""
StrCmp "$1" "$ClassName" 0 +2
DeleteRegValue HKCU "Software\Classes\.${extenstion}" ""
DeleteRegKey HKCU "Software\Classes\$ClassName"
;
StrCmp "$1" "$ClassName" 0 +2
ReadRegStr $2 HKCU "Software\Classes\.${extenstion}" "DaumLiveBackup.bak"
DeleteRegValue HKCU "Software\Classes\.${extenstion}" "DaumLiveBackup.bak"
WriteRegStr HKCU "Software\Classes\.${extenstion}" "" "$2"
StrCmp "$2" "$ClassName" 0 +2
DeleteRegValue HKCU "Software\Classes\.${extenstion}" ""
;
DeleteRegKey /ifempty HKCU "Software\Classes\.${extenstion}"
;
ReadRegStr $1 HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.${extenstion}" "DaumLiveBackup.bak"
ReadRegStr $2 HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.${extenstion}\UserChoice" "Progid"
DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.${extenstion}" "DaumLiveBackup.bak"
StrCmp "$2" "$ClassName" 0 +5
DeleteRegKey HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.${extenstion}\UserChoice"
StrCmp "$1" "" +3
StrCmp "$1" "$ClassName" +2
WriteRegStr HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.${extenstion}\UserChoice" "Progid" "$1"
DeleteRegValue HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.${extenstion}\OpenWithProgids" "$ClassName"
${DelRegValue} HKCU "Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.${extenstion}\OpenWithList" "PotPlayerMini.exe"
;
Pop $1
Pop $2
!macroend
А не кажится вам команда
StrCmp "$1" "$ClassName" 0 +2 слишком часто пишется?
Почему бы вам не объединить под этим условием нужные команды?