; NSIS script (UTF-8) NSIS-Park-3 Unicode log
; Install

Unicode true
SetCompressor /SOLID lzma
SetCompressorDictSize 8

; --------------------
; HEADER SIZE: 172566
; START HEADER SIZE: 300
; MAX STRING LENGTH: 8196
; STRING CHARS: 11066

OutFile [NSIS].exe
!include WinMessages.nsh

AutoCloseWindow true
InstallDirRegKey HKLM "Software\Alexander Avdonin\CloseAll" ""
LicenseBkColor /windows


; --------------------
; LANG TABLES: 1
; LANG STRINGS: 107

Name CloseAll
BrandingText "CloseAll 2.0"

; LANG: 1033
LangString LSTR_0 1033 "CloseAll 2.0"
LangString LSTR_1 1033 "$(LSTR_2) Setup"
LangString LSTR_2 1033 CloseAll
LangString LSTR_3 1033 "Space available: "
LangString LSTR_4 1033 "Space required: "
LangString LSTR_5 1033 "Can't write: "
LangString LSTR_8 1033 "Could not find symbol: "
LangString LSTR_9 1033 "Could not load: "
LangString LSTR_10 1033 "Create folder: "
LangString LSTR_11 1033 "Create shortcut: "
LangString LSTR_12 1033 "Created uninstaller: "
LangString LSTR_13 1033 "Delete file: "
LangString LSTR_14 1033 "Delete on reboot: "
LangString LSTR_15 1033 "Error creating shortcut: "
LangString LSTR_16 1033 "Error creating: "
LangString LSTR_17 1033 "Error decompressing data! Corrupted installer?"
LangString LSTR_19 1033 "ExecShell: "
LangString LSTR_20 1033 "Execute: "
LangString LSTR_21 1033 "Extract: "
LangString LSTR_22 1033 "Extract: error writing to file "
LangString LSTR_23 1033 "Installer corrupted: invalid opcode"
LangString LSTR_24 1033 "No OLE for: "
LangString LSTR_25 1033 "Output folder: "
LangString LSTR_26 1033 "Remove folder: "
LangString LSTR_29 1033 "Skipped: "
LangString LSTR_30 1033 "Copy Details To Clipboard"
LangString LSTR_31 1033 "Log install process"
LangString LSTR_32 1033 B
LangString LSTR_33 1033 K
LangString LSTR_34 1033 M
LangString LSTR_35 1033 G
LangString LSTR_36 1033 "If you accept the terms of the agreement, click I Agree to continue. You must accept the agreement to install $(LSTR_106)."
LangString LSTR_37 1033 "License Agreement"
LangString LSTR_38 1033 "Please review the license terms before installing $(LSTR_106)."
LangString LSTR_39 1033 "Press Page Down to see the rest of the agreement."
LangString LSTR_40 1033 "To start the update process, close CloseAll and press the Install button."
LangString LSTR_41 1033 &Install
LangString LSTR_42 1033 "Update CloseAll"
LangString LSTR_43 1033 "An older version of CloseAll is installed on your system."
LangString LSTR_44 1033 "CloseAll change log:"
LangString LSTR_45 1033 "Choose Components"
LangString LSTR_46 1033 "Choose which features of $(LSTR_106) you want to install."
LangString LSTR_47 1033 Description
LangString LSTR_48 1033 "Position your mouse over a component to see its description."
LangString LSTR_49 1033 "Choose Install Location"
LangString LSTR_50 1033 "Choose the folder in which to install $(LSTR_106)."
LangString LSTR_51 1033 Installing
LangString LSTR_52 1033 "Please wait while $(LSTR_106) is being installed."
LangString LSTR_53 1033 "Installation Complete"
LangString LSTR_54 1033 "Setup was completed successfully."
LangString LSTR_55 1033 "Installation Aborted"
LangString LSTR_56 1033 "Setup was not completed successfully."
LangString LSTR_57 1033 &Finish
LangString LSTR_58 1033 "Completing the $(LSTR_106) Setup"
LangString LSTR_59 1033 "$(LSTR_106) has been installed on your computer.$\r$\n$\r$\nClick Finish to close Setup."
LangString LSTR_60 1033 "&Run $(LSTR_106)"
LangString LSTR_61 1033 "&Show Readme"
LangString LSTR_62 1033 "Error opening file for writing: $\r$\n$\r$\n$0$\r$\n$\r$\nClick Abort to stop the installation,$\r$\nRetry to try again, or$\r$\nIgnore to skip this file."
LangString LSTR_63 1033 "MS Shell Dlg"
LangString LSTR_64 1033 0
LangString LSTR_65 1033 8
LangString LSTR_66 1033 "Are you sure you want to quit $(LSTR_2) Setup?"
LangString LSTR_67 1033 Full
LangString LSTR_68 1033 "Please close CloseAll and press OK to continue."
LangString LSTR_69 1033 "CloseAll Core Files (required)"
LangString LSTR_70 1033 "Additional Shortcuts"
LangString LSTR_71 1033 "Start Menu Shortcuts"
LangString LSTR_72 1033 "Quick Launch Shortcut"
LangString LSTR_73 1033 "Desktop Shortcut"
LangString LSTR_74 1033 "Install for all users"
LangString LSTR_75 1033 CloseAll
LangString LSTR_76 1033 "CloseAll Homepage"
LangString LSTR_77 1033 "A newer version of CloseAll is already installed! It is not recommended that you install an older version. If you really want to install this older version, it's better to uninstall the current version first. Select the operation you want to perform and click Next to continue."
LangString LSTR_78 1033 "Uninstall before installing"
LangString LSTR_79 1033 "Do not uninstall"
LangString LSTR_80 1033 "Already Installed"
LangString LSTR_81 1033 "Choose how you want to install CloseAll."
LangString LSTR_82 1033 "This version of $(LSTR_2) is already installed on your system. Select the operation you want to perform and click Next to continue."
LangString LSTR_83 1033 "Add/Reinstall components"
LangString LSTR_84 1033 "Uninstall CloseAll"
LangString LSTR_85 1033 "Choose the maintenance option to perform."
LangString LSTR_86 1033 "This program requires features present in Windows 2000/XP/Vista."
LangString LSTR_87 1033 Custom
LangString LSTR_88 1033 Cancel
LangString LSTR_89 1033 "< &Back"
LangString LSTR_90 1033 "I &Agree"
LangString LSTR_91 1033 "Click Next to continue."
LangString LSTR_92 1033 "&Next >"
LangString LSTR_93 1033 "Check the components you want to install and uncheck the components you don't want to install. $_CLICK"
LangString LSTR_94 1033 "Select the type of install:"
LangString LSTR_95 1033 "Or, select the optional components you wish to install:"
LangString LSTR_96 1033 "Select components to install:"
LangString LSTR_97 1033 "Setup will install $(LSTR_106) in the following folder. To install in a different folder, click Browse and select another folder. $_CLICK"
LangString LSTR_98 1033 "Destination Folder"
LangString LSTR_99 1033 B&rowse...
LangString LSTR_100 1033 "Select the folder to install $(LSTR_106) in:"
LangString LSTR_101 1033 "Click Install to start the installation."
LangString LSTR_102 1033 "Show &details"
LangString LSTR_103 1033 Completed
LangString LSTR_104 1033 " "
LangString LSTR_105 1033 &Close
LangString LSTR_106 1033 CloseAll


; --------------------
; VARIABLES: 12

Var _0_
Var _1_
Var _2_
Var _3_
Var _4_
Var _5_
Var _6_
Var _7_
Var _8_
Var _9_
Var _10_
Var _11_


InstType $(LSTR_67)    ;  Full
InstType $(LSTR_87)    ;  Custom
InstallDir $PROGRAMFILES\CloseAll
; install_directory_auto_append = CloseAll
; wininit = $WINDIR\wininit.ini


; --------------------
; PAGES: 8

; Page 0
Page license func_0 func_6 func_10 /ENABLECANCEL
  LicenseText $(LSTR_36) $(LSTR_90)    ;  "If you accept the terms of the agreement, click I Agree to continue. You must accept the agreement to install $(LSTR_106)." "I &Agree" CloseAll
  LicenseData [LICENSE].rtf

; Page 1
Page license func_11 func_17 func_21 /ENABLECANCEL
  LicenseText $(LSTR_40) $(LSTR_41)    ;  "To start the update process, close CloseAll and press the Install button." &Install
  LicenseData [LICENSE]-2.rtf

; Page 2
Page custom func_385 func_416 /ENABLECANCEL

; Page 3
Page components func_23 func_29 func_40 /ENABLECANCEL
  ComponentsText $(LSTR_93) $(LSTR_94) $(LSTR_95)    ;  "Check the components you want to install and uncheck the components you don't want to install. $_CLICK" "Select the type of install:" "Or, select the optional components you wish to install:"

; Page 4
Page directory func_41 func_47 func_48 /ENABLECANCEL
  DirText $(LSTR_97) $(LSTR_98) $(LSTR_99) $(LSTR_100)    ;  "Setup will install $(LSTR_106) in the following folder. To install in a different folder, click Browse and select another folder. $_CLICK" "Destination Folder" B&rowse... "Select the folder to install $(LSTR_106) in:" CloseAll CloseAll
  DirVar $CMDLINE

; Page 5
Page instfiles func_49 func_54 func_55
  CompletedText $(LSTR_103)    ;  Completed
  DetailsButtonText $(LSTR_102)    ;  "Show &details"

/*
; Page 6
Page COMPLETED
*/

; Page 7
Page custom func_68 func_160


; --------------------
; SECTIONS: 8
; COMMANDS: 636

Function func_0    ; Page 0, Pre
  Call func_235
  GetDlgItem $_0_ $HWNDPARENT 1037
  SendMessage $_0_ ${WM_SETTEXT} 0 STR:$(LSTR_37)    ;  "License Agreement"
  GetDlgItem $_0_ $HWNDPARENT 1038
  SendMessage $_0_ ${WM_SETTEXT} 0 STR:$(LSTR_38)    ;  "Please review the license terms before installing $(LSTR_106)." CloseAll
FunctionEnd


Function func_6    ; Page 0, Show
  FindWindow $_0_ "#32770" "" $HWNDPARENT
  GetDlgItem $_0_ $_0_ 1040
  SendMessage $_0_ ${WM_SETTEXT} 0 STR:$(LSTR_39)    ;  "Press Page Down to see the rest of the agreement."
FunctionEnd


Function func_10    ; Page 0, Leave
FunctionEnd


Function func_11    ; Page 1, Pre
  Call func_242
  GetDlgItem $_0_ $HWNDPARENT 1037
  SendMessage $_0_ ${WM_SETTEXT} 0 STR:$(LSTR_42)    ;  "Update CloseAll"
  GetDlgItem $_0_ $HWNDPARENT 1038
  SendMessage $_0_ ${WM_SETTEXT} 0 STR:$(LSTR_43)    ;  "An older version of CloseAll is installed on your system."
FunctionEnd


Function func_17    ; Page 1, Show
  FindWindow $_0_ "#32770" "" $HWNDPARENT
  GetDlgItem $_0_ $_0_ 1040
  SendMessage $_0_ ${WM_SETTEXT} 0 STR:$(LSTR_44)    ;  "CloseAll change log:"
FunctionEnd


Function func_21    ; Page 1, Leave
  Call func_247
FunctionEnd


Function func_23    ; Page 3, Pre
  Call func_256
  GetDlgItem $_0_ $HWNDPARENT 1037
  SendMessage $_0_ ${WM_SETTEXT} 0 STR:$(LSTR_45)    ;  "Choose Components"
  GetDlgItem $_0_ $HWNDPARENT 1038
  SendMessage $_0_ ${WM_SETTEXT} 0 STR:$(LSTR_46)    ;  "Choose which features of $(LSTR_106) you want to install." CloseAll
FunctionEnd


Function func_29    ; Page 3, Show
  FindWindow $_0_ "#32770" "" $HWNDPARENT
  GetDlgItem $_0_ $_0_ 1042
  SendMessage $_0_ ${WM_SETTEXT} 0 STR:$(LSTR_47)    ;  Description
  FindWindow $_0_ "#32770" "" $HWNDPARENT
  GetDlgItem $_0_ $_0_ 1043
  EnableWindow $_0_ 0
  FindWindow $_0_ "#32770" "" $HWNDPARENT
  GetDlgItem $_0_ $_0_ 1043
  SendMessage $_0_ ${WM_SETTEXT} 0 STR:$(LSTR_48)    ;  "Position your mouse over a component to see its description."
  StrCpy $_2_ $(LSTR_48)    ;  "Position your mouse over a component to see its description."
FunctionEnd


Function func_40    ; Page 3, Leave
FunctionEnd


Function func_41    ; Page 4, Pre
  Call func_259
  GetDlgItem $_0_ $HWNDPARENT 1037
  SendMessage $_0_ ${WM_SETTEXT} 0 STR:$(LSTR_49)    ;  "Choose Install Location"
  GetDlgItem $_0_ $HWNDPARENT 1038
  SendMessage $_0_ ${WM_SETTEXT} 0 STR:$(LSTR_50)    ;  "Choose the folder in which to install $(LSTR_106)." CloseAll
FunctionEnd


Function func_47    ; Page 4, Show
FunctionEnd


Function func_48    ; Page 4, Leave
FunctionEnd


Function func_49    ; Page 5, Pre
  GetDlgItem $_0_ $HWNDPARENT 1037
  SendMessage $_0_ ${WM_SETTEXT} 0 STR:$(LSTR_51)    ;  Installing
  GetDlgItem $_0_ $HWNDPARENT 1038
  SendMessage $_0_ ${WM_SETTEXT} 0 STR:$(LSTR_52)    ;  "Please wait while $(LSTR_106) is being installed." CloseAll
FunctionEnd


Function func_54    ; Page 5, Show
FunctionEnd


Function func_55    ; Page 5, Leave
  IfAbort label_61
  GetDlgItem $_0_ $HWNDPARENT 1037
  SendMessage $_0_ ${WM_SETTEXT} 0 STR:$(LSTR_53)    ;  "Installation Complete"
  GetDlgItem $_0_ $HWNDPARENT 1038
  SendMessage $_0_ ${WM_SETTEXT} 0 STR:$(LSTR_54)    ;  "Setup was completed successfully."
  Goto label_65
label_61:
  GetDlgItem $_0_ $HWNDPARENT 1037
  SendMessage $_0_ ${WM_SETTEXT} 0 STR:$(LSTR_55)    ;  "Installation Aborted"
  GetDlgItem $_0_ $HWNDPARENT 1038
  SendMessage $_0_ ${WM_SETTEXT} 0 STR:$(LSTR_56)    ;  "Setup was not completed successfully."
label_65:
  IfAbort label_67
  WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\CloseAll NSIS_Language $LANGUAGE
label_67:
FunctionEnd


Function func_68    ; Page 7, Pre
  Push $(LSTR_57)    ;  &Finish
  Call func_196
  Pop $_0_
  WriteINIStr $PLUGINSDIR\ioSpecial.ini Settings NextButtonText $_0_
  WriteINIStr $PLUGINSDIR\ioSpecial.ini "Field 2" Bottom 38
  WriteINIStr $PLUGINSDIR\ioSpecial.ini "Field 3" Top 45
  Push $(LSTR_58)    ;  "Completing the $(LSTR_106) Setup" CloseAll
  Call func_196
  Pop $_0_
  WriteINIStr $PLUGINSDIR\ioSpecial.ini "Field 2" Text $_0_
  WriteINIStr $PLUGINSDIR\ioSpecial.ini "Field 3" Bottom 85
  Push $(LSTR_59)    ;  "$(LSTR_106) has been installed on your computer.$\r$\n$\r$\nClick Finish to close Setup." CloseAll
  Call func_196
  Pop $_0_
  WriteINIStr $PLUGINSDIR\ioSpecial.ini "Field 3" Text $_0_
  WriteINIStr $PLUGINSDIR\ioSpecial.ini "Field 4" Type CheckBox
  Push $(LSTR_60)    ;  "&Run $(LSTR_106)" CloseAll
  Call func_196
  Pop $_0_
  WriteINIStr $PLUGINSDIR\ioSpecial.ini "Field 4" Text $_0_
  WriteINIStr $PLUGINSDIR\ioSpecial.ini "Field 4" Left 120
  WriteINIStr $PLUGINSDIR\ioSpecial.ini "Field 4" Right 315
  WriteINIStr $PLUGINSDIR\ioSpecial.ini "Field 4" Top 90
  WriteINIStr $PLUGINSDIR\ioSpecial.ini "Field 4" Bottom 100
  WriteINIStr $PLUGINSDIR\ioSpecial.ini "Field 4" State 1
  WriteINIStr $PLUGINSDIR\ioSpecial.ini "Field 5" Type CheckBox
  Push $(LSTR_61)    ;  "&Show Readme"
  Call func_196
  Pop $_0_
  WriteINIStr $PLUGINSDIR\ioSpecial.ini "Field 5" Text $_0_
  WriteINIStr $PLUGINSDIR\ioSpecial.ini "Field 5" Left 120
  WriteINIStr $PLUGINSDIR\ioSpecial.ini "Field 5" Right 315
  WriteINIStr $PLUGINSDIR\ioSpecial.ini "Field 5" Top 110
  WriteINIStr $PLUGINSDIR\ioSpecial.ini "Field 5" Bottom 120
  WriteINIStr $PLUGINSDIR\ioSpecial.ini Settings Numfields 5
  LockWindow on
  GetDlgItem $_0_ $HWNDPARENT 1028
  ShowWindow $_0_ ${SW_HIDE}
  GetDlgItem $_0_ $HWNDPARENT 1256
  ShowWindow $_0_ ${SW_HIDE}
  GetDlgItem $_0_ $HWNDPARENT 1035
  ShowWindow $_0_ ${SW_HIDE}
  GetDlgItem $_0_ $HWNDPARENT 1037
  ShowWindow $_0_ ${SW_HIDE}
  GetDlgItem $_0_ $HWNDPARENT 1038
  ShowWindow $_0_ ${SW_HIDE}
  GetDlgItem $_0_ $HWNDPARENT 1039
  ShowWindow $_0_ ${SW_HIDE}
  GetDlgItem $_0_ $HWNDPARENT 1045
  ShowWindow $_0_ ${SW_SHOWNORMAL}
  LockWindow off
  InstallOptions::initDialog $PLUGINSDIR\ioSpecial.ini
    ; Call Initialize_____Plugins
    ; SetOverwrite off
    ; File $PLUGINSDIR\InstallOptions.dll
    ; SetDetailsPrint lastused
    ; Push $PLUGINSDIR\ioSpecial.ini
    ; CallInstDLL $PLUGINSDIR\InstallOptions.dll initDialog
  Pop $_3_
  SetCtlColors $_3_ "" 0xFFFFFF
  GetDlgItem $_0_ $_3_ 1201
  SetCtlColors $_0_ "" 0xFFFFFF
  CreateFont $_1_ $(LSTR_63) 12 700    ;  "MS Shell Dlg"
  SendMessage $_0_ ${WM_SETFONT} $_1_ 0
  GetDlgItem $_0_ $_3_ 1202
  SetCtlColors $_0_ "" 0xFFFFFF
  GetDlgItem $_0_ $_3_ 1203
  SetCtlColors $_0_ "" 0xFFFFFF
  GetDlgItem $_0_ $_3_ 1204
  SetCtlColors $_0_ "" 0xFFFFFF
  Push $0
  InstallOptions::show
    ; Call Initialize_____Plugins
    ; File $PLUGINSDIR\InstallOptions.dll
    ; SetDetailsPrint lastused
    ; CallInstDLL $PLUGINSDIR\InstallOptions.dll show
  Pop $0
  Pop $0
  LockWindow on
  GetDlgItem $_0_ $HWNDPARENT 1028
  ShowWindow $_0_ ${SW_SHOWNORMAL}
  GetDlgItem $_0_ $HWNDPARENT 1256
  ShowWindow $_0_ ${SW_SHOWNORMAL}
  GetDlgItem $_0_ $HWNDPARENT 1035
  ShowWindow $_0_ ${SW_SHOWNORMAL}
  GetDlgItem $_0_ $HWNDPARENT 1037
  ShowWindow $_0_ ${SW_SHOWNORMAL}
  GetDlgItem $_0_ $HWNDPARENT 1038
  ShowWindow $_0_ ${SW_SHOWNORMAL}
  GetDlgItem $_0_ $HWNDPARENT 1039
  ShowWindow $_0_ ${SW_SHOWNORMAL}
  GetDlgItem $_0_ $HWNDPARENT 1045
  ShowWindow $_0_ ${SW_HIDE}
  LockWindow off
FunctionEnd


Function func_160    ; Page 7, Leave
  ReadINIStr $_0_ $PLUGINSDIR\ioSpecial.ini "Field 4" State
  StrCmp $_0_ 1 0 label_163
  Call func_266
label_163:
  ReadINIStr $_0_ $PLUGINSDIR\ioSpecial.ini "Field 5" State
  StrCmp $_0_ 1 0 label_166
  ExecShell open http://www.ntwind.com/software/utilities/close-all.html    ; "open http://www.ntwind.com/software/utilities/close-all.html"
label_166:
FunctionEnd


Function .onGUIInit
  InitPluginsDir
    ; Call Initialize_____Plugins
    ; SetDetailsPrint lastused
  SetOverwrite on
  File $PLUGINSDIR\ioSpecial.ini
  WriteINIStr $PLUGINSDIR\ioSpecial.ini Settings RTL $(LSTR_64)    ;  0
  File $PLUGINSDIR\modern-wizard.bmp
  WriteINIStr $PLUGINSDIR\ioSpecial.ini "Field 1" Text $PLUGINSDIR\modern-wizard.bmp
  InitPluginsDir
    ; Call Initialize_____Plugins
    ; SetDetailsPrint lastused
  File $PLUGINSDIR\modern-header.bmp
  SetBrandingImage /IMGID=1046 /RESIZETOFIT $PLUGINSDIR\modern-header.bmp
  GetDlgItem $_0_ $HWNDPARENT 1037
  CreateFont $_1_ $(LSTR_63) $(LSTR_65) 700    ;  "MS Shell Dlg" 8
  SendMessage $_0_ ${WM_SETFONT} $_1_ 0
  SetCtlColors $_0_ "" 0xFFFFFF
  GetDlgItem $_0_ $HWNDPARENT 1038
  SetCtlColors $_0_ "" 0xFFFFFF
  GetDlgItem $_0_ $HWNDPARENT 1034
  SetCtlColors $_0_ "" 0xFFFFFF
  GetDlgItem $_0_ $HWNDPARENT 1039
  SetCtlColors $_0_ "" 0xFFFFFF
  GetDlgItem $_0_ $HWNDPARENT 1028
  SetCtlColors $_0_ /BRANDING ""
  GetDlgItem $_0_ $HWNDPARENT 1256
  SetCtlColors $_0_ /BRANDING ""
  SendMessage $_0_ ${WM_SETTEXT} 0 "STR:$(LSTR_0) "    ;  "CloseAll 2.0"
FunctionEnd


Function .onUserAbort
  MessageBox MB_YESNO|MB_ICONEXCLAMATION $(LSTR_66) IDYES label_195    ;  "Are you sure you want to quit $(LSTR_2) Setup?" CloseAll
  Abort
label_195:
FunctionEnd


Function func_196
  Exch $0
    ; Push $0
    ; Exch
    ; Pop $0
  Push $1
  Push $2
  Push $3
  Push $4
  StrCpy $1 ""
  StrLen $3 $0
  IntOp $3 $3 - 1
  StrCpy $4 0
  Goto label_209
label_208:
  IntOp $4 $4 + 1
label_209:
  IntCmp $4 $3 0 0 label_226
  StrCpy $2 $0 1 $4
  StrCmp $2 \ 0 label_214
  StrCpy $2 \\
  Goto label_222
label_214:
  StrCmp $2 $\r 0 label_217
  StrCpy $2 \r
  Goto label_222
label_217:
  StrCmp $2 $\n 0 label_220
  StrCpy $2 \n
  Goto label_222
label_220:
  StrCmp $2 $\t 0 label_222
  StrCpy $2 \t
label_222:
  StrCpy $1 $1$2
  Goto label_208
  Goto label_208
  Goto label_226
label_226:
  StrCpy $0 $1
  Pop $4
  Pop $3
  Pop $2
  Pop $1
  Exch $0
    ; Push $0
    ; Exch
    ; Pop $0
FunctionEnd


Function func_235
  StrCmp $_9_ New 0 label_237
  Abort
label_237:
  StrCmp $_9_ Older 0 label_239
  Abort
label_239:
  StrCmp $_9_ Same 0 label_241
  Abort
label_241:
FunctionEnd


Function func_242
  StrCmp $_9_ New label_244
  Abort
label_244:
  GetDlgItem $0 $HWNDPARENT 3
  EnableWindow $0 0
FunctionEnd


Function func_247
  FindWindow $R0 "#32770" "Close All Windows"
  IsWindow $R0 0 label_251
  SendMessage $R0 34178 2048 0
  Sleep 200
label_251:
  FindWindow $R0 "#32770" "Close All Windows"
  IsWindow $R0 0 label_255
  MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION $(LSTR_68) /SD IDCANCEL IDOK label_251    ;  "Please close CloseAll and press OK to continue."
  Abort
label_255:
FunctionEnd


Function func_256
  StrCmp $_9_ New 0 label_258
  Abort
label_258:
FunctionEnd


Function func_259
  StrCmp $_9_ New 0 label_261
  Abort
label_261:
  StrCmp $_9_ Older 0 label_263
  Abort
label_263:
  StrCmp $_9_ Same 0 label_265
  Abort
label_265:
FunctionEnd


Function func_266
  StrCpy $R0 $_4_ 1
  StrCmp $R0 5 label_271
  Exec "$\"$TEMP\shexp.exe$\" /NONELEVATED $\"$INSTDIR\$_10_$\""
  Delete /REBOOTOK $TEMP\shexp.exe
  Goto label_272
label_271:
  Exec $INSTDIR\$_10_
label_272:
FunctionEnd


Section $(LSTR_69) ; Section_0    ;  "CloseAll Core Files (required)"
  ; AddSize 4964
  SectionIn 1 RO
  FindWindow $R0 "#32770" "Close All Windows"
  IsWindow $R0 0 label_277
  SendMessage $R0 34178 2048 0
  Sleep 200
label_277:
  FindWindow $R0 "#32770" "Close All Windows"
  IsWindow $R0 0 label_281
  MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION $(LSTR_68) /SD IDCANCEL IDOK label_277    ;  "Please close CloseAll and press OK to continue."
  Abort
label_281:
  Delete $INSTDIR\CloseAll.exe
  Delete $INSTDIR\CloseAll.exe
  ClearErrors
  ReadRegStr $R0 HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\CloseAll NSIS_AllUsers
  IfErrors label_298
  StrCmp $R0 Yes label_289
  SetShellVarContext current
  Goto label_290
label_289:
  SetShellVarContext all
label_290:
  ClearErrors
  ReadRegStr $R0 HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\CloseAll NSIS_StartMenuShortcuts
  IfErrors label_295
  StrCmp $R0 Yes 0 label_295
  RMDir /r $SMPROGRAMS\CloseAll
label_295:
  ReadRegStr $R0 HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\CloseAll NSIS_DesktopShortcuts
  StrCmp $R0 Yes 0 label_298
  Delete $DESKTOP\CloseAll.lnk
label_298:
  DeleteRegValue HKCU Software\Microsoft\Windows\CurrentVersion\Run CloseAll
  DeleteRegValue HKLM Software\Microsoft\Windows\CurrentVersion\Run CloseAll
  SetOutPath $INSTDIR
  System::Call kernel32::GetCurrentProcess()i.s
    ; Call Initialize_____Plugins
    ; SetOverwrite off
    ; File $PLUGINSDIR\System.dll
    ; SetDetailsPrint lastused
    ; Push kernel32::GetCurrentProcess()i.s
    ; CallInstDLL $PLUGINSDIR\System.dll Call
  System::Call kernel32::IsWow64Process(is,*i.s)
    ; Call Initialize_____Plugins
    ; AllowSkipFiles off
    ; File $PLUGINSDIR\System.dll
    ; SetDetailsPrint lastused
    ; Push kernel32::IsWow64Process(is,*i.s)
    ; CallInstDLL $PLUGINSDIR\System.dll Call
  Pop $_11_
  StrCmp $_11_ 0 label_315
  SetOverwrite on
  AllowSkipFiles on
  File CloseAll.exe
  Goto label_316
label_315:
  File CloseAll.exe
label_316:
  File License.rtf
  File ReadMe.txt
  File History.rtf
  StrCpy $R0 $_4_ 1
  StrCmp $R0 5 label_323
  SetOutPath $TEMP
  File shexp.exe
label_323:
SectionEnd


SectionGroup /e $(LSTR_70)    ; Section 1    ;  "Additional Shortcuts"

Section $(LSTR_71) ; Section_2    ;  "Start Menu Shortcuts"
  SectionIn 1
  StrCpy $_6_ Yes
SectionEnd


Section $(LSTR_72) ; Section_3    ;  "Quick Launch Shortcut"
  SectionIn 1
  StrCpy $_8_ Yes
SectionEnd


Section $(LSTR_73) ; Section_4    ;  "Desktop Shortcut"
  SectionIn 1
  StrCpy $_7_ Yes
SectionEnd


SectionGroupEnd

Section $(LSTR_74) ; Section_6    ;  "Install for all users"
  SectionIn 1
  StrCpy $_5_ Yes
SectionEnd


Function func_334
  System::Call "shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)"
    ; Call Initialize_____Plugins
    ; SetOverwrite off
    ; AllowSkipFiles off
    ; File $PLUGINSDIR\System.dll
    ; SetDetailsPrint lastused
    ; Push "shell32.dll::SHChangeNotify(i, i, i, i) v (0x08000000, 0, 0, 0)"
    ; CallInstDLL $PLUGINSDIR\System.dll Call
FunctionEnd


Section ; Section_7
  ; AddSize 88
  Push ""
  Call func_448
  SetOutPath $INSTDIR
  WriteRegStr HKLM "Software\Alexander Avdonin\CloseAll" "" $INSTDIR
  WriteRegDWORD HKLM "Software\Alexander Avdonin\CloseAll" VersionMajor 2
  WriteRegDWORD HKLM "Software\Alexander Avdonin\CloseAll" VersionMinor 0
  WriteRegDWORD HKLM "Software\Alexander Avdonin\CloseAll" VersionBuild 0
  WriteRegDWORD HKLM "Software\Alexander Avdonin\CloseAll" VersionRevision 0
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\$_10_" "" $INSTDIR\$_10_
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\$_10_" Path $INSTDIR
  WriteRegExpandStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\CloseAll UninstallString $INSTDIR\uninst.exe
  WriteRegExpandStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\CloseAll InstallLocation $INSTDIR
  WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\CloseAll DisplayName $(LSTR_2)    ;  CloseAll
  WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\CloseAll DisplayIcon $INSTDIR\$_10_
  WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\CloseAll DisplayVersion 2.0
  WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\CloseAll Readme $INSTDIR\ReadMe.txt
  WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\CloseAll Publisher "NTWind Software"
  WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\CloseAll URLInfoAbout mailto:support@ntwind.com?subject=CloseAll_2.0&body=Hi!
  WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\CloseAll HelpLink http://www.ntwind.com/software/utilities/close-all.html
  WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\CloseAll VersionMajor 2
  WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\CloseAll VersionMinor 0
  WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\CloseAll VersionBuild 0
  WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\CloseAll VersionRevision 0
  WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\CloseAll NoModify 1
  WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\CloseAll NoRepair 1
  WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\CloseAll NSIS_AllUsers $_5_
  WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\CloseAll NSIS_StartMenuShortcuts $_6_
  WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\CloseAll NSIS_DesktopShortcuts $_7_
  WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\CloseAll NSIS_QuicklaunchShortcuts $_8_
  StrCmp $_5_ Yes label_372
  SetShellVarContext current
  Goto label_373
label_372:
  SetShellVarContext all
label_373:
  StrCmp $_6_ Yes 0 label_377
  CreateDirectory $SMPROGRAMS\CloseAll
  CreateShortCut $SMPROGRAMS\CloseAll\$(LSTR_75).lnk $INSTDIR\$_10_    ;  CloseAll
  WriteINIStr $SMPROGRAMS\CloseAll\$(LSTR_76).url InternetShortcut URL http://www.ntwind.com/software/utilities/close-all.html    ;  "CloseAll Homepage"
label_377:
  StrCmp $_7_ Yes 0 label_379
  CreateShortCut $DESKTOP\CloseAll.lnk $INSTDIR\$_10_
label_379:
  StrCmp $_8_ Yes 0 label_381
  CreateShortCut $APPDATA\CloseAll.lnk $INSTDIR\$_10_
label_381:
  SetOverwrite on
  AllowSkipFiles on
  File uninst.exe
  StrCmp $_9_ Same label_384
  Call func_334
label_384:
SectionEnd


Function func_385    ; Page 2, Pre
  StrCmp $_9_ Older 0 label_395
  WriteINIStr $PLUGINSDIR\reinstall.ini "Field 1" Text $(LSTR_77)    ;  "A newer version of CloseAll is already installed! It is not recommended that you install an older version. If you really want to install this older version, it's better to uninstall the current version first. Select the operation you want to perform and click Next to continue."
  WriteINIStr $PLUGINSDIR\reinstall.ini "Field 2" Text $(LSTR_78)    ;  "Uninstall before installing"
  WriteINIStr $PLUGINSDIR\reinstall.ini "Field 3" Text $(LSTR_79)    ;  "Do not uninstall"
  GetDlgItem $_0_ $HWNDPARENT 1037
  SendMessage $_0_ ${WM_SETTEXT} 0 STR:$(LSTR_80)    ;  "Already Installed"
  GetDlgItem $_0_ $HWNDPARENT 1038
  SendMessage $_0_ ${WM_SETTEXT} 0 STR:$(LSTR_81)    ;  "Choose how you want to install CloseAll."
  StrCpy $R0 1
  Goto label_405
label_395:
  StrCmp $_9_ Same label_397
  Abort
label_397:
  WriteINIStr $PLUGINSDIR\reinstall.ini "Field 1" Text $(LSTR_82)    ;  "This version of $(LSTR_2) is already installed on your system. Select the operation you want to perform and click Next to continue." CloseAll
  WriteINIStr $PLUGINSDIR\reinstall.ini "Field 2" Text $(LSTR_83)    ;  "Add/Reinstall components"
  WriteINIStr $PLUGINSDIR\reinstall.ini "Field 3" Text $(LSTR_84)    ;  "Uninstall CloseAll"
  GetDlgItem $_0_ $HWNDPARENT 1037
  SendMessage $_0_ ${WM_SETTEXT} 0 STR:$(LSTR_80)    ;  "Already Installed"
  GetDlgItem $_0_ $HWNDPARENT 1038
  SendMessage $_0_ ${WM_SETTEXT} 0 STR:$(LSTR_85)    ;  "Choose the maintenance option to perform."
  StrCpy $R0 2
label_405:
  GetDlgItem $0 $HWNDPARENT 3
  EnableWindow $0 0
  Push $0
  InstallOptions::dialog $PLUGINSDIR\reinstall.ini
    ; Call Initialize_____Plugins
    ; SetOverwrite off
    ; File $PLUGINSDIR\InstallOptions.dll
    ; SetDetailsPrint lastused
    ; Push $PLUGINSDIR\reinstall.ini
    ; CallInstDLL $PLUGINSDIR\InstallOptions.dll dialog
  Pop $0
  Pop $0
FunctionEnd


Function func_416    ; Page 2, Leave
  FindWindow $R2 "#32770" "Close All Windows"
  IsWindow $R2 0 label_420
  SendMessage $R2 34178 2048 0
  Sleep 200
label_420:
  FindWindow $R2 "#32770" "Close All Windows"
  IsWindow $R2 0 label_424
  MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION $(LSTR_68) /SD IDCANCEL IDOK label_420    ;  "Please close CloseAll and press OK to continue."
  Abort
label_424:
  StrCpy $R1 0
  ReadINIStr $R1 $PLUGINSDIR\reinstall.ini "Field 2" State
  StrCmp $R0 1 0 label_428
  StrCmp $R1 1 label_430 label_447
label_428:
  StrCmp $R0 2 0 label_431
  StrCmp $R1 1 label_447 label_430
label_430:
  ReadRegStr $R1 HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\CloseAll UninstallString
label_431:
  HideWindow
  StrCmp $_9_ Same 0 label_436
  ClearErrors
  ExecWait "$\"$R1$\" _?=$INSTDIR"
  Goto label_438
label_436:
  ClearErrors
  ExecWait "$\"$R1$\" /safe _?=$INSTDIR"
label_438:
  IfErrors label_443
  IfFileExists $INSTDIR\CloseAll.exe label_443
  IfFileExists $INSTDIR\CloseAll.exe label_443
  Delete $R1
  RMDir $INSTDIR
label_443:
  StrCmp $R0 2 0 label_445
  Quit
label_445:
    ; ShowWindow $HWNDPARENT ${SW_SHOW}
  BringToFront
label_447:
FunctionEnd


Function func_448
  Exch $R0
    ; Push $R0
    ; Exch
    ; Pop $R0
  Push $R1
  ClearErrors
  ReadRegStr $R1 HKCU "Software\Alexander Avdonin\CloseAll\2.0" LangFile
  IfErrors 0 label_456
  WriteRegStr HKCU "Software\Alexander Avdonin\CloseAll\2.0" LangFile $R0
label_456:
  Pop $R1
  Pop $R0
FunctionEnd


Function func_459
  Push $R0
  Push $R1
  Push $R2
  Push $R3
  StrCpy $R2 1
  StrLen $R3 $CMDLINE
  StrCpy $R0 $CMDLINE $R2
  StrCmp $R0 $\" 0 label_469
  StrCpy $R1 $\"
  Goto label_470
label_469:
  StrCpy $R1 " "
label_470:
  IntOp $R2 $R2 + 1
  StrCpy $R0 $CMDLINE 1 $R2
  StrCmp $R0 $R1 label_475
  StrCmp $R2 $R3 label_475
  Goto label_470
label_475:
  IntOp $R2 $R2 + 1
  StrCpy $R0 $CMDLINE 1 $R2
  StrCmp $R0 " " label_475
  StrCpy $R0 $CMDLINE "" $R2
  Pop $R3
  Pop $R2
  Pop $R1
  Exch $R0
    ; Push $R0
    ; Exch
    ; Pop $R0
FunctionEnd


Function func_486
  Exch $R1
    ; Push $R1
    ; Exch
    ; Pop $R1
  Exch
  Exch $R2
    ; Push $R2
    ; Exch
    ; Pop $R2
  Push $R3
  Push $R4
  Push $R5
  StrLen $R3 $R1
  StrCpy $R4 0
label_498:
  StrCpy $R5 $R2 $R3 $R4
  StrCmp $R5 $R1 label_503
  StrCmp $R5 "" label_503
  IntOp $R4 $R4 + 1
  Goto label_498
label_503:
  StrCpy $R1 $R2 "" $R4
  Pop $R5
  Pop $R4
  Pop $R3
  Pop $R2
  Exch $R1
    ; Push $R1
    ; Exch
    ; Pop $R1
FunctionEnd


Function func_512
  Exch $R0
    ; Push $R0
    ; Exch
    ; Pop $R0
  Exch
  Exch $R1
    ; Push $R1
    ; Exch
    ; Pop $R1
  Push $R2
  Push $R3
  Push $R4
  Push $R5
  StrLen $R2 $R1+2
  Call func_459
  Pop $R3
  StrCpy $R5 $\"
  Push $R3
  Push $\"/$R1=
  Call func_486
  Pop $R4
  StrCpy $R4 $R4 "" 1
  StrCmp $R4 "" 0 label_538
  StrCpy $R5 " "
  Push $R3
  Push /$R1=
  Call func_486
  Pop $R4
label_538:
  StrCmp $R4 "" label_548
  StrCpy $R0 $R4 "" $R2
  Push $R0
  Push $R5
  Call func_486
  Pop $R4
  StrCmp $R4 "" label_554
  StrLen $R4 $R4
  StrCpy $R0 $R0 -$R4
  Goto label_554
label_548:
  Push $R3
  Push /$R1
  Call func_486
  Pop $R4
  StrCmp $R4 "" label_554
  StrCpy $R0 ""
label_554:
  Pop $R5
  Pop $R4
  Pop $R3
  Pop $R2
  Pop $R1
  Exch $R0
    ; Push $R0
    ; Exch
    ; Pop $R0
FunctionEnd


Function .onInit
  Push WRITEUNINSTALLER
  Push None
  Call func_512
  Pop $2
  StrCmp $2 None label_570
  WriteUninstaller $2 ;  $INSTDIR\$2
  Abort
label_570:
  InitPluginsDir
    ; Call Initialize_____Plugins
    ; SetDetailsPrint lastused
  SetOverwrite on
  File $PLUGINSDIR\reinstall.ini
  WriteINIStr $PLUGINSDIR\reinstall.ini Settings RTL $(LSTR_64)    ;  0
  ClearErrors
  ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
  IfErrors label_581
  StrCpy $_4_ $R0 3
  StrCpy $R1 $R0 1
  StrCmp $R1 5 label_583
  StrCmp $R1 6 label_583 label_581
label_581:
  MessageBox MB_OK|MB_ICONSTOP $(LSTR_86)    ;  "This program requires features present in Windows 2000/XP/Vista."
  Abort
label_583:
  System::Call kernel32::GetCurrentProcess()i.s
    ; Call Initialize_____Plugins
    ; SetOverwrite off
    ; AllowSkipFiles off
    ; File $PLUGINSDIR\System.dll
    ; SetDetailsPrint lastused
    ; Push kernel32::GetCurrentProcess()i.s
    ; CallInstDLL $PLUGINSDIR\System.dll Call
  System::Call kernel32::IsWow64Process(is,*i.s)
    ; Call Initialize_____Plugins
    ; File $PLUGINSDIR\System.dll
    ; SetDetailsPrint lastused
    ; Push kernel32::IsWow64Process(is,*i.s)
    ; CallInstDLL $PLUGINSDIR\System.dll Call
  Pop $_11_
  StrCmp $_11_ 0 label_598
  StrCpy $_10_ CloseAll.exe
  StrCpy $INSTDIR $PROGRAMFILES64\CloseAll
  Goto label_600
label_598:
  StrCpy $_10_ CloseAll.exe
  StrCpy $INSTDIR $PROGRAMFILES\CloseAll
label_600:
  StrCpy $_5_ No
  StrCpy $_6_ No
  StrCpy $_7_ No
  StrCpy $_9_ ""
  ReadRegStr $R0 HKLM "Software\Alexander Avdonin\CloseAll" ""
  StrCmp $R0 "" 0 label_607
  Goto label_621
label_607:
  StrCpy $INSTDIR $R0
  ReadRegDWORD $R0 HKLM "Software\Alexander Avdonin\CloseAll" VersionMajor
  IntCmp $R0 2 label_610 label_616 label_618
label_610:
  ReadRegDWORD $R0 HKLM "Software\Alexander Avdonin\CloseAll" VersionMinor
  IntCmp $R0 0 label_612 label_616 label_618
label_612:
  ReadRegDWORD $R0 HKLM "Software\Alexander Avdonin\CloseAll" VersionBuild
  IntCmp $R0 0 label_614 label_616 label_618
label_614:
  ReadRegDWORD $R0 HKLM "Software\Alexander Avdonin\CloseAll" VersionRevision
  IntCmp $R0 0 label_620 label_616 label_618
label_616:
  StrCpy $_9_ New
  Goto label_621
label_618:
  StrCpy $_9_ Older
  Goto label_621
label_620:
  StrCpy $_9_ Same
label_621:
FunctionEnd


/*
Function Initialize_____Plugins
  SetDetailsPrint none
  StrCmp $PLUGINSDIR "" 0 label_632
  Push $0
  SetErrors
  GetTempFileName $0
  Delete $0
  CreateDirectory $0
  IfErrors label_633
  StrCpy $PLUGINSDIR $0
  Pop $0
label_632:
  Return

label_633:
  MessageBox MB_OK|MB_ICONSTOP "Error! Can't initialize plug-ins directory. Please try again later." /SD IDOK
  Quit
FunctionEnd
*/



; --------------------
; UNREFERENCED STRINGS:

/*
37 CommonFilesDir
52 "$PROGRAMFILES\Common Files"
68 $COMMONFILES
*/
