Created
November 6, 2017 10:09
-
-
Save anonymous/ee03e53ec9bf70297052c83099157965 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; NSIS script NSIS-3 BadCmd=11 | |
; Install | |
SetCompressor /SOLID zlib | |
; -------------------- | |
; HEADER SIZE: 59868 | |
; START HEADER SIZE: 300 | |
; MAX STRING LENGTH: 1024 | |
; STRING CHARS: 9922 | |
OutFile [NSIS].exe | |
!include WinMessages.nsh | |
; -------------------- | |
; LANG TABLES: 1 | |
; LANG STRINGS: 64 | |
Name smartmontools | |
BrandingText "Nullsoft Install System v3.02.1" | |
; LANG: 1033 | |
LangString LSTR_0 1033 "Nullsoft Install System v3.02.1" | |
LangString LSTR_1 1033 "$(LSTR_2) Setup" | |
LangString LSTR_2 1033 smartmontools | |
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_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_32 1033 B | |
LangString LSTR_33 1033 " K" | |
LangString LSTR_34 1033 " M" | |
LangString LSTR_35 1033 " G" | |
LangString LSTR_36 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_37 1033 Custom | |
LangString LSTR_38 1033 Cancel | |
LangString LSTR_39 1033 ": License Agreement" | |
LangString LSTR_41 1033 "Please review the license agreement before installing $(LSTR_63). If you accept all terms of the agreement, click I Agree." | |
LangString LSTR_42 1033 "< &Back" | |
LangString LSTR_43 1033 "I &Agree" | |
LangString LSTR_44 1033 "Click Next to continue." | |
LangString LSTR_45 1033 ": Installation Options" | |
LangString LSTR_46 1033 "Check the components you want to install and uncheck the components you don't want to install. $_CLICK" | |
LangString LSTR_47 1033 "Select the type of install:" | |
LangString LSTR_48 1033 "Or, select the optional components you wish to install:" | |
LangString LSTR_49 1033 "Select components to install:" | |
LangString LSTR_50 1033 "&Next >" | |
LangString LSTR_51 1033 ": Installation Folder" | |
LangString LSTR_52 1033 "Setup will install $(LSTR_63) in the following folder. To install in a different folder, click Browse and select another folder. $_CLICK" | |
LangString LSTR_53 1033 "Destination Folder" | |
LangString LSTR_54 1033 B&rowse... | |
LangString LSTR_55 1033 "Select the folder to install $(LSTR_63) in:" | |
LangString LSTR_56 1033 &Install | |
LangString LSTR_57 1033 "Click Install to start the installation." | |
LangString LSTR_58 1033 ": Installing" | |
LangString LSTR_59 1033 "Show &details" | |
LangString LSTR_60 1033 Completed | |
LangString LSTR_61 1033 ": Completed" | |
LangString LSTR_62 1033 &Close | |
LangString LSTR_63 1033 smartmontools | |
; -------------------- | |
; VARIABLES: 4 | |
Var _0_ | |
Var _1_ | |
Var _2_ | |
Var _3_ | |
InstType Full | |
InstType "Extract files only" | |
InstType "Drive menu" | |
InstType $(LSTR_37) ; Custom | |
InstallDir $TEMP | |
; wininit = $WINDIR\wininit.ini | |
; -------------------- | |
; PAGES: 5 | |
; Page 0 | |
Page license /ENABLECANCEL | |
LicenseText $(LSTR_41) $(LSTR_43) ; "Please review the license agreement before installing $(LSTR_63). If you accept all terms of the agreement, click I Agree." "I &Agree" smartmontools | |
LicenseData $(LSTR_40) | |
; Page 1 | |
Page components /ENABLECANCEL | |
ComponentsText $(LSTR_46) $(LSTR_47) $(LSTR_48) ; "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 2 | |
Page directory /ENABLECANCEL | |
DirText $(LSTR_52) $(LSTR_53) $(LSTR_54) $(LSTR_55) ; "Setup will install $(LSTR_63) 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_63) in:" smartmontools smartmontools | |
DirVar $CMDLINE | |
; Page 3 | |
Page instfiles | |
CompletedText $(LSTR_60) ; Completed | |
DetailsButtonText $(LSTR_59) ; "Show &details" | |
/* | |
; Page 4 | |
Page COMPLETED | |
*/ | |
; -------------------- | |
; SECTIONS: 19 | |
; COMMANDS: 1041 | |
SectionGroup "!Program files" ; Section 0 | |
Section smartctl ; Section_1 | |
SectionIn 1 2 | |
SetOutPath $INSTDIR\bin | |
SectionEnd | |
Section smartd ; Section_2 | |
SectionIn 1 2 | |
SetOutPath $INSTDIR\bin | |
StrCpy $1 "" | |
IfFileExists $INSTDIR\bin\smartd.exe 0 label_9 | |
ReadRegStr $0 HKLM System\CurrentControlSet\Services\smartd ImagePath | |
StrCmp $0 "" label_9 | |
ExecWait "net stop smartd" $1 | |
label_9: | |
IfFileExists $INSTDIR\bin\smartd.conf 0 label_11 | |
MessageBox MB_YESNO|MB_ICONQUESTION|MB_DEFBUTTON2 "Replace existing configuration file$\n$INSTDIR\bin\smartd.conf ?" /SD IDNO IDYES 0 IDNO label_12 | |
label_11: | |
StrCmp $1 0 0 label_14 | |
label_12: | |
MessageBox MB_YESNO|MB_ICONQUESTION|MB_DEFBUTTON2 "Restart smartd service ?" /SD IDNO IDYES 0 IDNO label_14 | |
ExecWait "net start smartd" | |
label_14: | |
SectionEnd | |
Section "smartctl-nc (GSmartControl)" ; Section_3 | |
SectionIn 1 2 | |
SetOutPath $INSTDIR\bin | |
SectionEnd | |
Section "drivedb.h (Drive Database)" ; Section_4 | |
SectionIn 1 2 | |
SetOutPath $INSTDIR\bin | |
SectionEnd | |
SectionGroupEnd | |
Section !Documentation ; Section_6 | |
SectionIn 1 2 | |
SetOutPath $INSTDIR\doc | |
SectionEnd | |
Section Uninstaller ; Section_7 | |
; AddSize 40 | |
SectionIn 1 | |
CreateDirectory $INSTDIR | |
ReadRegStr $0 HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\GSmartControl InstallLocation | |
ReadRegStr $1 HKLM Software\smartmontools Install_Dir | |
StrCmp $0$1 "" label_27 | |
WriteRegStr HKLM Software\smartmontools Install_Dir $INSTDIR | |
label_27: | |
WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\smartmontools DisplayName smartmontools | |
WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\smartmontools InstallLocation $INSTDIR | |
WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\smartmontools UninstallString $\"$INSTDIR\uninst-smartmontools.exe$\" | |
WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\smartmontools Publisher smartmontools.org | |
WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\smartmontools URLInfoAbout http://www.smartmontools.org/ | |
WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\smartmontools HelpLink http://sourceforge.net/projects/smartmontools/support | |
WriteRegStr HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\smartmontools URLUpdateInfo http://smartmontools.no-ip.org/ | |
WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\smartmontools NoModify 1 | |
WriteRegDWORD HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\smartmontools NoRepair 1 | |
WriteUninstaller uninst-smartmontools.exe ; $INSTDIR\uninst-smartmontools.exe ; !!! ERROR: SKIP possible BadCmd | |
SectionEnd | |
Section "Start Menu Shortcuts" ; Section_8 | |
SectionIn 1 | |
SetShellVarContext all | |
CreateDirectory $SMPROGRAMS\smartmontools | |
IfFileExists $INSTDIR\bin\smartctl.exe 0 label_42 | |
IfFileExists $INSTDIR\bin\smartd.exe 0 label_43 | |
label_42: | |
SetOutPath $INSTDIR\bin | |
label_43: | |
IfFileExists $INSTDIR\bin\smartctl.exe 0 label_91 | |
SetOutPath $INSTDIR\bin | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartctl (Admin CMD).lnk" $WINDIR\system32\cmd.exe "/k PATH=$INSTDIR\bin;%PATH%&cd /d $\"$INSTDIR\bin$\"" | |
Push "$SMPROGRAMS\smartmontools\smartctl (Admin CMD).lnk" | |
Call func_953 | |
CreateDirectory "$SMPROGRAMS\smartmontools\smartctl Examples" | |
FileOpen $0 "$SMPROGRAMS\smartmontools\smartctl Examples\!Read this first!.txt" w | |
FileWrite $0 "All the example commands in this directory$\r$\napply to the first drive (sda).$\r$\n" | |
FileClose $0 | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartctl Examples\All info (-x).lnk" $INSTDIR\bin\runcmdu.exe "smartctl -x sda" | |
Push "$SMPROGRAMS\smartmontools\smartctl Examples\All info (-x).lnk" | |
Call func_953 | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartctl Examples\Identify drive (-i).lnk" $INSTDIR\bin\runcmdu.exe "smartctl -i sda" | |
Push "$SMPROGRAMS\smartmontools\smartctl Examples\Identify drive (-i).lnk" | |
Call func_953 | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartctl Examples\SMART attributes (-A -f brief).lnk" $INSTDIR\bin\runcmdu.exe "smartctl -A -f brief sda" | |
Push "$SMPROGRAMS\smartmontools\smartctl Examples\SMART attributes (-A -f brief).lnk" | |
Call func_953 | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartctl Examples\SMART capabilities (-c).lnk" $INSTDIR\bin\runcmdu.exe "smartctl -c sda" | |
Push "$SMPROGRAMS\smartmontools\smartctl Examples\SMART capabilities (-c).lnk" | |
Call func_953 | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartctl Examples\SMART health status (-H).lnk" $INSTDIR\bin\runcmdu.exe "smartctl -H sda" | |
Push "$SMPROGRAMS\smartmontools\smartctl Examples\SMART health status (-H).lnk" | |
Call func_953 | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartctl Examples\SMART error log (-l error).lnk" $INSTDIR\bin\runcmdu.exe "smartctl -l error sda" | |
Push "$SMPROGRAMS\smartmontools\smartctl Examples\SMART error log (-l error).lnk" | |
Call func_953 | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartctl Examples\SMART selftest log (-l selftest).lnk" $INSTDIR\bin\runcmdu.exe "smartctl -l selftest sda" | |
Push "$SMPROGRAMS\smartmontools\smartctl Examples\SMART selftest log (-l selftest).lnk" | |
Call func_953 | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartctl Examples\Start long selftest (-t long).lnk" $INSTDIR\bin\runcmdu.exe "smartctl -t long sda" | |
Push "$SMPROGRAMS\smartmontools\smartctl Examples\Start long selftest (-t long).lnk" | |
Call func_953 | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartctl Examples\Start offline test (-t offline).lnk" $INSTDIR\bin\runcmdu.exe "smartctl -t offline sda" | |
Push "$SMPROGRAMS\smartmontools\smartctl Examples\Start offline test (-t offline).lnk" | |
Call func_953 | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartctl Examples\Start short selftest (-t short).lnk" $INSTDIR\bin\runcmdu.exe "smartctl -t short sda" | |
Push "$SMPROGRAMS\smartmontools\smartctl Examples\Start short selftest (-t short).lnk" | |
Call func_953 | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartctl Examples\Stop(Abort) selftest (-X).lnk" $INSTDIR\bin\runcmdu.exe "smartctl -X sda" | |
Push "$SMPROGRAMS\smartmontools\smartctl Examples\Stop(Abort) selftest (-X).lnk" | |
Call func_953 | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartctl Examples\Turn SMART off (-s off).lnk" $INSTDIR\bin\runcmdu.exe "smartctl -s off sda" | |
Push "$SMPROGRAMS\smartmontools\smartctl Examples\Turn SMART off (-s off).lnk" | |
Call func_953 | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartctl Examples\Turn SMART on (-s on).lnk" $INSTDIR\bin\runcmdu.exe "smartctl -s on sda" | |
Push "$SMPROGRAMS\smartmontools\smartctl Examples\Turn SMART on (-s on).lnk" | |
Call func_953 | |
label_91: | |
IfFileExists $INSTDIR\bin\smartd.exe 0 label_132 | |
SetOutPath $INSTDIR\bin | |
CreateDirectory "$SMPROGRAMS\smartmontools\smartd Examples" | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartd Examples\Daemon start, smartd.log.lnk" $INSTDIR\bin\runcmdu.exe "smartd -l local0" | |
Push "$SMPROGRAMS\smartmontools\smartd Examples\Daemon start, smartd.log.lnk" | |
Call func_953 | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartd Examples\Daemon start, eventlog.lnk" $INSTDIR\bin\runcmdu.exe smartd | |
Push "$SMPROGRAMS\smartmontools\smartd Examples\Daemon start, eventlog.lnk" | |
Call func_953 | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartd Examples\Daemon stop.lnk" $INSTDIR\bin\runcmdu.exe "smartd stop" | |
Push "$SMPROGRAMS\smartmontools\smartd Examples\Daemon stop.lnk" | |
Call func_953 | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartd Examples\Do all tests once (-q onecheck).lnk" $INSTDIR\bin\runcmdu.exe "smartd -q onecheck" | |
Push "$SMPROGRAMS\smartmontools\smartd Examples\Do all tests once (-q onecheck).lnk" | |
Call func_953 | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartd Examples\Debug mode (-d).lnk" $INSTDIR\bin\runcmdu.exe "smartd -d" | |
Push "$SMPROGRAMS\smartmontools\smartd Examples\Debug mode (-d).lnk" | |
Call func_953 | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartd Examples\smartd.conf (edit).lnk" $_0_ $INSTDIR\bin\smartd.conf | |
Push "$SMPROGRAMS\smartmontools\smartd Examples\smartd.conf (edit).lnk" | |
Call func_953 | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartd Examples\smartd.conf (view).lnk" $_0_ $INSTDIR\bin\smartd.conf | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartd Examples\smartd.log (view).lnk" $_0_ $INSTDIR\bin\smartd.log | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartd Examples\Service install, eventlog, 30min.lnk" $INSTDIR\bin\runcmdu.exe "smartd install" | |
Push "$SMPROGRAMS\smartmontools\smartd Examples\Service install, eventlog, 30min.lnk" | |
Call func_953 | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartd Examples\Service install, smartd.log, 10min.lnk" $INSTDIR\bin\runcmdu.exe "smartd install -l local0 -i 600" | |
Push "$SMPROGRAMS\smartmontools\smartd Examples\Service install, smartd.log, 10min.lnk" | |
Call func_953 | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartd Examples\Service install, smartd.log, 30min.lnk" $INSTDIR\bin\runcmdu.exe "smartd install -l local0" | |
Push "$SMPROGRAMS\smartmontools\smartd Examples\Service install, smartd.log, 30min.lnk" | |
Call func_953 | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartd Examples\Service remove.lnk" $INSTDIR\bin\runcmdu.exe "smartd remove" | |
Push "$SMPROGRAMS\smartmontools\smartd Examples\Service remove.lnk" | |
Call func_953 | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartd Examples\Service start.lnk" $INSTDIR\bin\runcmdu.exe "net start smartd" | |
Push "$SMPROGRAMS\smartmontools\smartd Examples\Service start.lnk" | |
Call func_953 | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartd Examples\Service stop.lnk" $INSTDIR\bin\runcmdu.exe "net stop smartd" | |
Push "$SMPROGRAMS\smartmontools\smartd Examples\Service stop.lnk" | |
Call func_953 | |
label_132: | |
IfFileExists $INSTDIR\doc\README.TXT 0 label_151 | |
SetOutPath $INSTDIR\doc | |
CreateDirectory $SMPROGRAMS\smartmontools\Documentation | |
CreateShortCut "$SMPROGRAMS\smartmontools\Documentation\smartctl manual page (html).lnk" $INSTDIR\doc\smartctl.8.html | |
CreateShortCut "$SMPROGRAMS\smartmontools\Documentation\smartd manual page (html).lnk" $INSTDIR\doc\smartd.8.html | |
CreateShortCut "$SMPROGRAMS\smartmontools\Documentation\smartd.conf manual page (html).lnk" $INSTDIR\doc\smartd.conf.5.html | |
CreateShortCut "$SMPROGRAMS\smartmontools\Documentation\smartctl manual page (txt).lnk" $INSTDIR\doc\smartctl.8.txt | |
CreateShortCut "$SMPROGRAMS\smartmontools\Documentation\smartd manual page (txt).lnk" $INSTDIR\doc\smartd.8.txt | |
CreateShortCut "$SMPROGRAMS\smartmontools\Documentation\smartd.conf manual page (txt).lnk" $INSTDIR\doc\smartd.conf.5.txt | |
CreateShortCut "$SMPROGRAMS\smartmontools\Documentation\smartd.conf sample.lnk" $_0_ $INSTDIR\doc\smartd.conf | |
IfFileExists $INSTDIR\bin\drivedb.h 0 label_147 | |
CreateShortCut "$SMPROGRAMS\smartmontools\Documentation\drivedb.h (view).lnk" $_0_ $INSTDIR\bin\drivedb.h | |
CreateShortCut "$SMPROGRAMS\smartmontools\Documentation\drivedb-add.h (create, edit).lnk" $_0_ $INSTDIR\bin\drivedb-add.h | |
Push "$SMPROGRAMS\smartmontools\Documentation\drivedb-add.h (create, edit).lnk" | |
Call func_953 | |
label_147: | |
CreateShortCut $SMPROGRAMS\smartmontools\Documentation\ChangeLog.lnk $INSTDIR\doc\ChangeLog.txt | |
CreateShortCut $SMPROGRAMS\smartmontools\Documentation\COPYING.lnk $INSTDIR\doc\COPYING.txt | |
CreateShortCut $SMPROGRAMS\smartmontools\Documentation\NEWS.lnk $INSTDIR\doc\NEWS.txt | |
CreateShortCut "$SMPROGRAMS\smartmontools\Documentation\Windows version download page.lnk" http://smartmontools.no-ip.org/ | |
label_151: | |
CreateShortCut "$SMPROGRAMS\smartmontools\smartmontools Home Page.lnk" http://www.smartmontools.org/ | |
IfFileExists $INSTDIR\bin\update-smart-drivedb.exe 0 label_157 | |
SetOutPath $INSTDIR\bin | |
CreateShortCut "$SMPROGRAMS\smartmontools\drivedb.h update.lnk" $INSTDIR\bin\update-smart-drivedb.exe | |
Push "$SMPROGRAMS\smartmontools\drivedb.h update.lnk" | |
Call func_953 | |
label_157: | |
IfFileExists $INSTDIR\uninst-smartmontools.exe 0 label_162 | |
SetOutPath $INSTDIR | |
CreateShortCut "$SMPROGRAMS\smartmontools\Uninstall smartmontools.lnk" $INSTDIR\uninst-smartmontools.exe | |
Push "$SMPROGRAMS\smartmontools\Uninstall smartmontools.lnk" | |
Call func_953 | |
label_162: | |
SectionEnd | |
Section "Add install dir to PATH" ; Section_9 | |
SectionIn 1 | |
Push $INSTDIR\bin | |
Call func_863 | |
SectionEnd | |
SectionGroup "Add smartctl to drive menu" ; Section 10 | |
Section /o "Remove existing entries first" ; Section_11 | |
SectionIn 3 | |
DetailPrint "Remove drive menu entries" | |
DeleteRegKey HKCR Drive\shell\smartctl0 | |
DeleteRegKey HKCR Drive\shell\smartctl1 | |
DeleteRegKey HKCR Drive\shell\smartctl2 | |
DeleteRegKey HKCR Drive\shell\smartctl3 | |
DeleteRegKey HKCR Drive\shell\smartctl4 | |
DeleteRegKey HKCR Drive\shell\smartctl5 | |
SectionEnd | |
Section /o "smartctl -x ..." ; Section_12 | |
SectionIn 3 | |
Call func_860 | |
DetailPrint "Add drive menu entry $\"SMART all info$\": smartctl -x ..." | |
WriteRegStr HKCR Drive\shell\smartctl0 "" "SMART all info" | |
WriteRegStr HKCR Drive\shell\smartctl0\command "" "$\"$INSTDIR\bin\runcmda.exe$\" $\"$INSTDIR\bin\smartctl.exe$\" -x %L" | |
SectionEnd | |
Section /o "smartctl -Hc ..." ; Section_13 | |
SectionIn 3 | |
Call func_860 | |
DetailPrint "Add drive menu entry $\"SMART status$\": smartctl -Hc ..." | |
WriteRegStr HKCR Drive\shell\smartctl1 "" "SMART status" | |
WriteRegStr HKCR Drive\shell\smartctl1\command "" "$\"$INSTDIR\bin\runcmda.exe$\" $\"$INSTDIR\bin\smartctl.exe$\" -Hc %L" | |
SectionEnd | |
Section /o "smartctl -A -f brief ..." ; Section_14 | |
SectionIn 3 | |
Call func_860 | |
DetailPrint "Add drive menu entry $\"SMART attributes$\": smartctl -A -f brief ..." | |
WriteRegStr HKCR Drive\shell\smartctl2 "" "SMART attributes" | |
WriteRegStr HKCR Drive\shell\smartctl2\command "" "$\"$INSTDIR\bin\runcmda.exe$\" $\"$INSTDIR\bin\smartctl.exe$\" -A -f brief %L" | |
SectionEnd | |
Section /o "smartctl -t short ..." ; Section_15 | |
SectionIn 3 | |
Call func_860 | |
DetailPrint "Add drive menu entry $\"SMART short selftest$\": smartctl -t short ..." | |
WriteRegStr HKCR Drive\shell\smartctl3 "" "SMART short selftest" | |
WriteRegStr HKCR Drive\shell\smartctl3\command "" "$\"$INSTDIR\bin\runcmda.exe$\" $\"$INSTDIR\bin\smartctl.exe$\" -t short %L" | |
SectionEnd | |
Section /o "smartctl -t long ..." ; Section_16 | |
SectionIn 3 | |
Call func_860 | |
DetailPrint "Add drive menu entry $\"SMART long selftest$\": smartctl -t long ..." | |
WriteRegStr HKCR Drive\shell\smartctl4 "" "SMART long selftest" | |
WriteRegStr HKCR Drive\shell\smartctl4\command "" "$\"$INSTDIR\bin\runcmda.exe$\" $\"$INSTDIR\bin\smartctl.exe$\" -t long %L" | |
SectionEnd | |
Section /o "smartctl -t $\"selective,cont$\" ..." ; Section_17 | |
SectionIn 3 | |
Call func_860 | |
DetailPrint "Add drive menu entry $\"SMART continue selective selftest$\": smartctl -t $\"selective,cont$\" ..." | |
WriteRegStr HKCR Drive\shell\smartctl5 "" "SMART continue selective selftest" | |
WriteRegStr HKCR Drive\shell\smartctl5\command "" "$\"$INSTDIR\bin\runcmda.exe$\" $\"$INSTDIR\bin\smartctl.exe$\" -t $\"selective,cont$\" %L" | |
SectionEnd | |
SectionGroupEnd | |
Function .onInit | |
SetOutPath $INSTDIR | |
File 779973275 | |
System::Call "* (&t256$\t)$\t$\tp $\t $\t.r5 $\t $\t" | |
; Call Initialize_____Plugins | |
; SetOverwrite off | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "* (&t256$\t)$\t$\tp $\t $\t.r5 $\t $\t" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
System::Call "msvcrt::malloc(i 100000000) $\t p .r5" | |
; Call Initialize_____Plugins | |
; AllowSkipFiles off | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "msvcrt::malloc(i 100000000) $\t p .r5" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
System::Call "kernel32::GetSystemInfo(p$\t$\t r5)" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "kernel32::GetSystemInfo(p$\t$\t r5)" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
System::Call "user32::wsprintf(p r5, t '%s\779973275', t o)" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "user32::wsprintf(p r5, t '%s\779973275', t o)" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
System::Call "kernel32::CreateFile(p $\t $\t r5, i 0x80000000, $\tn, $\t n,$\t i 3, n, n)$\ti$\t .r10" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "kernel32::CreateFile(p $\t $\t r5, i 0x80000000, $\tn, $\t n,$\t i 3, n, n)$\ti$\t .r10" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
System::Call "*(i) p .r2" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "*(i) p .r2" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
System::Call "*(i 878535, i 0) p .r1" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "*(i 878535, i 0) p .r1" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
System::Call "*(&t255) p .r5" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "*(&t255) p .r5" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
System::Call "user32::wsprintf(p r5, t $\t$\t '%s%s%s%s%s%i%s', t 'nt', t 'dll::NtC', t 'reat', t 'eSect', t 'ion(p r2, i ', i 0xE, t ', n,')" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "user32::wsprintf(p r5, t $\t$\t '%s%s%s%s%s%i%s', t 'nt', t 'dll::NtC', t 'reat', t 'eSect', t 'ion(p r2, i ', i 0xE, t ', n,')" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
System::Call "*$5(&t255 .r5)" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "*$5(&t255 .r5)" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
System::Call "$5 p r1, i 0x40, i 0x8000000, n)" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "$5 p r1, i 0x40, i 0x8000000, n)" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
System::Call "*(p 0) p .r3" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "*(p 0) p .r3" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
System::Call "*(i 0) p .r4" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "*(i 0) p .r4" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
System::Call "*$2(p .r2)" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "*$2(p .r2)" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
System::Call "*(&t255) p .r5" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "*(&t255) p .r5" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
System::Call "user32::wsprintf(p r5, t 'll::%s%s%s%s%d', t $\t $\t 'NtM', t 'apVi', t 'ewOfSect', t 'ion(p r', i 2)" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "user32::wsprintf(p r5, t 'll::%s%s%s%s%d', t $\t $\t 'NtM', t 'apVi', t 'ewOfSect', t 'ion(p r', i 2)" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
System::Call "*$5(&t255 .r5)" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "*$5(&t255 .r5)" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
System::Call "ntd$5, i -1, p r3, n, n, n, p r4, i 2, n, i 0x40)" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "ntd$5, i -1, p r3, n, n, n, p r4, i 2, n, i 0x40)" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
System::Call "*$3 ($\t$\tp . $\t$\t r11$\t$\t $\t)" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "*$3 ($\t$\tp . $\t$\t r11$\t$\t $\t)" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
System::Call "kernel32::ReadFile(i r10, p r11, i 878535, t., n)" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "kernel32::ReadFile(i r10, p r11, i 878535, t., n)" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
System::Call "kernel32::CloseHandle(i r10)" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "kernel32::CloseHandle(i r10)" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
System::Int64Op $R1 + 866638 | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push 866638 | |
; Push + | |
; Push $R1 | |
; CallInstDLL $PLUGINSDIR\System.dll Int64Op | |
Pop $R2 | |
System::Int64Op $R1 + 1008 | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push 1008 | |
; Push + | |
; Push $R1 | |
; CallInstDLL $PLUGINSDIR\System.dll Int64Op | |
Pop $R3 | |
System::Call "*(&t255) p .r5" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "*(&t255) p .r5" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
System::Call "user32::wsprintf(p r5, t '::%d%s' ,$\t i r12, t '(')" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "user32::wsprintf(p r5, t '::%d%s' ,$\t i r12, t '(')" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
System::Call "*$5(&t255 .r5)" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "*$5(&t255 .r5)" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
System::Call "$5p r13, i 863248)" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "$5p r13, i 863248)" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
StrCmp $INSTDIR "" 0 label_355 | |
ReadRegStr $INSTDIR HKLM Software\Microsoft\Windows\CurrentVersion\Uninstall\smartmontools InstallLocation | |
StrCmp $INSTDIR "" 0 label_355 | |
ReadRegStr $INSTDIR HKLM Software\smartmontools Install_Dir | |
StrCmp $INSTDIR "" 0 label_355 | |
StrCpy $INSTDIR $PROGRAMFILES\smartmontools | |
label_355: | |
StrCpy $_0_ $PROGRAMFILES\Notepad++\notepad++.exe | |
IfFileExists $_0_ label_358 | |
StrCpy $_0_ notepad.exe | |
label_358: | |
Call func_360 | |
FunctionEnd | |
Function func_360 | |
Call :label_362 | |
Goto label_395 | |
label_362: | |
StrCmp $CMDLINE "" 0 label_365 | |
Push "" | |
Return | |
label_365: | |
Push $0 | |
Push $1 | |
Push $2 | |
Push $3 | |
StrLen $1 $CMDLINE | |
StrCpy $2 2 | |
StrCpy $3 $CMDLINE 1 | |
StrCmp $3 $\" label_374 | |
StrCpy $3 " " | |
label_374: | |
IntCmp $2 $1 label_378 0 label_378 | |
StrCpy $0 $CMDLINE 1 $2 | |
IntOp $2 $2 + 1 | |
StrCmp $3 $0 0 label_374 | |
label_378: | |
IntCmp $2 $1 label_383 0 label_383 | |
StrCpy $0 $CMDLINE 1 $2 | |
StrCmp $0 " " 0 label_383 | |
IntOp $2 $2 + 1 | |
Goto label_378 | |
label_383: | |
StrCpy $0 $CMDLINE "" $2 | |
label_384: | |
StrCpy $1 $0 1 -1 | |
StrCmp $1 " " 0 label_388 | |
StrCpy $0 $0 -1 | |
Goto label_384 | |
label_388: | |
Pop $3 | |
Pop $2 | |
Pop $1 | |
Exch $0 | |
; Push $0 | |
; Exch | |
; Pop $0 | |
Return | |
label_395: | |
Pop $R0 | |
Push $R0 | |
Push /SO | |
Call :label_400 | |
Goto label_489 | |
label_400: | |
Exch $1 | |
; Push $1 | |
; Exch | |
; Pop $1 | |
Exch | |
Exch $0 | |
; Push $0 | |
; Exch | |
; Pop $0 | |
Exch | |
Push $2 | |
Push $3 | |
Push $4 | |
Push $5 | |
Push $6 | |
Push $7 | |
ClearErrors | |
StrCpy $2 $1 "" 1 | |
StrCpy $1 $1 1 | |
StrLen $3 $2 | |
StrCpy $7 0 | |
label_419: | |
StrCpy $4 -1 | |
StrCpy $6 "" | |
label_421: | |
IntOp $4 $4 + 1 | |
StrCpy $5 $0 1 $4 | |
StrCmp $5$7 0 label_476 | |
StrCmp $5 "" label_463 | |
StrCmp $5 $\" 0 label_432 | |
StrCmp $6 "" 0 label_429 | |
StrCpy $6 $\" | |
Goto label_421 | |
label_429: | |
StrCmp $6 $\" 0 label_432 | |
StrCpy $6 "" | |
Goto label_421 | |
label_432: | |
StrCmp $5 ' 0 label_439 | |
StrCmp $6 "" 0 label_436 | |
StrCpy $6 ' | |
Goto label_421 | |
label_436: | |
StrCmp $6 ' 0 label_439 | |
StrCpy $6 "" | |
Goto label_421 | |
label_439: | |
StrCmp $5 ` 0 label_446 | |
StrCmp $6 "" 0 label_443 | |
StrCpy $6 ` | |
Goto label_421 | |
label_443: | |
StrCmp $6 ` 0 label_446 | |
StrCpy $6 "" | |
Goto label_421 | |
label_446: | |
StrCmp $6 $\" label_421 | |
StrCmp $6 ' label_421 | |
StrCmp $6 ` label_421 | |
StrCmp $5 $1 0 label_421 | |
StrCmp $7 0 label_451 label_463 | |
label_451: | |
IntOp $4 $4 + 1 | |
StrCpy $5 $0 $3 $4 | |
StrCmp $5 "" label_476 | |
StrCmp $5 $2 0 label_421 | |
IntOp $4 $4 + $3 | |
StrCpy $0 $0 "" $4 | |
label_457: | |
StrCpy $4 $0 1 | |
StrCmp $4 " " 0 label_461 | |
StrCpy $0 $0 "" 1 | |
Goto label_457 | |
label_461: | |
StrCpy $7 1 | |
Goto label_419 | |
label_463: | |
StrCpy $0 $0 $4 | |
label_464: | |
StrCpy $4 $0 1 -1 | |
StrCmp $4 " " 0 label_468 | |
StrCpy $0 $0 -1 | |
Goto label_464 | |
label_468: | |
StrCpy $3 $0 1 | |
StrCpy $4 $0 1 -1 | |
StrCmp $3 $4 0 label_478 | |
StrCmp $3 $\" label_474 | |
StrCmp $3 ' label_474 | |
StrCmp $3 ` 0 label_478 | |
label_474: | |
StrCpy $0 $0 -1 1 | |
Goto label_478 | |
label_476: | |
SetErrors | |
StrCpy $0 "" | |
label_478: | |
Pop $7 | |
Pop $6 | |
Pop $5 | |
Pop $4 | |
Pop $3 | |
Pop $2 | |
Pop $1 | |
Exch $0 | |
; Push $0 | |
; Exch | |
; Pop $0 | |
Return | |
label_489: | |
Pop $_1_ | |
IfErrors 0 label_492 | |
Return | |
label_492: | |
StrCpy $_2_ "" | |
StrCpy $_3_ t | |
StrCpy $_2_ $_2_,smartctl | |
Push ,$_1_, | |
Push ,smartctl, | |
Call func_927 | |
Pop $0 | |
StrCmp $0 "" 0 label_509 | |
Push $0 | |
Push $1 | |
StrCpy $1 1 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 & 0xFFFFFFFE | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
Goto label_518 | |
label_509: | |
Push $0 | |
Push $1 | |
StrCpy $1 1 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 | 1 | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
StrCpy $_3_ "" | |
label_518: | |
StrCpy $_2_ $_2_,smartd | |
Push ,$_1_, | |
Push ,smartd, | |
Call func_927 | |
Pop $0 | |
StrCmp $0 "" 0 label_533 | |
Push $0 | |
Push $1 | |
StrCpy $1 2 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 & 0xFFFFFFFE | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
Goto label_542 | |
label_533: | |
Push $0 | |
Push $1 | |
StrCpy $1 2 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 | 1 | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
StrCpy $_3_ "" | |
label_542: | |
StrCpy $_2_ $_2_,smartctlnc | |
Push ,$_1_, | |
Push ,smartctlnc, | |
Call func_927 | |
Pop $0 | |
StrCmp $0 "" 0 label_557 | |
Push $0 | |
Push $1 | |
StrCpy $1 3 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 & 0xFFFFFFFE | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
Goto label_566 | |
label_557: | |
Push $0 | |
Push $1 | |
StrCpy $1 3 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 | 1 | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
StrCpy $_3_ "" | |
label_566: | |
StrCpy $_2_ $_2_,drivedb | |
Push ,$_1_, | |
Push ,drivedb, | |
Call func_927 | |
Pop $0 | |
StrCmp $0 "" 0 label_581 | |
Push $0 | |
Push $1 | |
StrCpy $1 4 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 & 0xFFFFFFFE | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
Goto label_590 | |
label_581: | |
Push $0 | |
Push $1 | |
StrCpy $1 4 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 | 1 | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
StrCpy $_3_ "" | |
label_590: | |
StrCpy $_2_ $_2_,doc | |
Push ,$_1_, | |
Push ,doc, | |
Call func_927 | |
Pop $0 | |
StrCmp $0 "" 0 label_605 | |
Push $0 | |
Push $1 | |
StrCpy $1 6 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 & 0xFFFFFFFE | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
Goto label_614 | |
label_605: | |
Push $0 | |
Push $1 | |
StrCpy $1 6 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 | 1 | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
StrCpy $_3_ "" | |
label_614: | |
StrCpy $_2_ $_2_,uninst | |
Push ,$_1_, | |
Push ,uninst, | |
Call func_927 | |
Pop $0 | |
StrCmp $0 "" 0 label_629 | |
Push $0 | |
Push $1 | |
StrCpy $1 7 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 & 0xFFFFFFFE | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
Goto label_638 | |
label_629: | |
Push $0 | |
Push $1 | |
StrCpy $1 7 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 | 1 | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
StrCpy $_3_ "" | |
label_638: | |
StrCpy $_2_ $_2_,menu | |
Push ,$_1_, | |
Push ,menu, | |
Call func_927 | |
Pop $0 | |
StrCmp $0 "" 0 label_653 | |
Push $0 | |
Push $1 | |
StrCpy $1 8 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 & 0xFFFFFFFE | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
Goto label_662 | |
label_653: | |
Push $0 | |
Push $1 | |
StrCpy $1 8 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 | 1 | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
StrCpy $_3_ "" | |
label_662: | |
StrCpy $_2_ $_2_,path | |
Push ,$_1_, | |
Push ,path, | |
Call func_927 | |
Pop $0 | |
StrCmp $0 "" 0 label_677 | |
Push $0 | |
Push $1 | |
StrCpy $1 9 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 & 0xFFFFFFFE | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
Goto label_686 | |
label_677: | |
Push $0 | |
Push $1 | |
StrCpy $1 9 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 | 1 | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
StrCpy $_3_ "" | |
label_686: | |
StrCpy $_2_ $_2_,driveremove | |
Push ,$_1_, | |
Push ,driveremove, | |
Call func_927 | |
Pop $0 | |
StrCmp $0 "" 0 label_701 | |
Push $0 | |
Push $1 | |
StrCpy $1 11 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 & 0xFFFFFFFE | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
Goto label_710 | |
label_701: | |
Push $0 | |
Push $1 | |
StrCpy $1 11 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 | 1 | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
StrCpy $_3_ "" | |
label_710: | |
StrCpy $_2_ $_2_,drive0 | |
Push ,$_1_, | |
Push ,drive0, | |
Call func_927 | |
Pop $0 | |
StrCmp $0 "" 0 label_725 | |
Push $0 | |
Push $1 | |
StrCpy $1 12 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 & 0xFFFFFFFE | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
Goto label_734 | |
label_725: | |
Push $0 | |
Push $1 | |
StrCpy $1 12 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 | 1 | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
StrCpy $_3_ "" | |
label_734: | |
StrCpy $_2_ $_2_,drive1 | |
Push ,$_1_, | |
Push ,drive1, | |
Call func_927 | |
Pop $0 | |
StrCmp $0 "" 0 label_749 | |
Push $0 | |
Push $1 | |
StrCpy $1 13 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 & 0xFFFFFFFE | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
Goto label_758 | |
label_749: | |
Push $0 | |
Push $1 | |
StrCpy $1 13 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 | 1 | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
StrCpy $_3_ "" | |
label_758: | |
StrCpy $_2_ $_2_,drive2 | |
Push ,$_1_, | |
Push ,drive2, | |
Call func_927 | |
Pop $0 | |
StrCmp $0 "" 0 label_773 | |
Push $0 | |
Push $1 | |
StrCpy $1 14 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 & 0xFFFFFFFE | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
Goto label_782 | |
label_773: | |
Push $0 | |
Push $1 | |
StrCpy $1 14 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 | 1 | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
StrCpy $_3_ "" | |
label_782: | |
StrCpy $_2_ $_2_,drive3 | |
Push ,$_1_, | |
Push ,drive3, | |
Call func_927 | |
Pop $0 | |
StrCmp $0 "" 0 label_797 | |
Push $0 | |
Push $1 | |
StrCpy $1 15 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 & 0xFFFFFFFE | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
Goto label_806 | |
label_797: | |
Push $0 | |
Push $1 | |
StrCpy $1 15 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 | 1 | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
StrCpy $_3_ "" | |
label_806: | |
StrCpy $_2_ $_2_,drive4 | |
Push ,$_1_, | |
Push ,drive4, | |
Call func_927 | |
Pop $0 | |
StrCmp $0 "" 0 label_821 | |
Push $0 | |
Push $1 | |
StrCpy $1 16 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 & 0xFFFFFFFE | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
Goto label_830 | |
label_821: | |
Push $0 | |
Push $1 | |
StrCpy $1 16 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 | 1 | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
StrCpy $_3_ "" | |
label_830: | |
StrCpy $_2_ $_2_,drive5 | |
Push ,$_1_, | |
Push ,drive5, | |
Call func_927 | |
Pop $0 | |
StrCmp $0 "" 0 label_845 | |
Push $0 | |
Push $1 | |
StrCpy $1 17 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 & 0xFFFFFFFE | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
Goto label_854 | |
label_845: | |
Push $0 | |
Push $1 | |
StrCpy $1 17 | |
SectionGetFlags $1 $0 | |
IntOp $0 $0 | 1 | |
SectionSetFlags $1 $0 | |
Pop $1 | |
Pop $0 | |
StrCpy $_3_ "" | |
label_854: | |
StrCmp $_1_ - label_859 | |
StrCmp $_3_ "" label_859 | |
StrCpy $0 $_2_,- "" 1 | |
MessageBox MB_OK "Usage: smartmontools-VERSION.win32-setup [/S] [/SO component,...] [/D=INSTDIR]$\n$\ncomponents:$\n $0" | |
Abort | |
label_859: | |
FunctionEnd | |
Function func_860 | |
IfFileExists $INSTDIR\bin\runcmda.exe label_862 | |
SetOutPath $INSTDIR\bin | |
label_862: | |
FunctionEnd | |
Function func_863 | |
Exch $0 | |
; Push $0 | |
; Exch | |
; Pop $0 | |
Push $1 | |
Push $2 | |
Push $3 | |
Push $4 | |
System::Call "advapi32::RegOpenKey(i 0x80000001, t'Environment', *i.r3) i.r4" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "advapi32::RegOpenKey(i 0x80000001, t'Environment', *i.r3) i.r4" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
IntCmp $4 0 0 label_921 label_921 | |
System::Call "advapi32::RegQueryValueEx(i $3, t'PATH', i 0, i 0, t.r1, *i 1024 r2) i.r4" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "advapi32::RegQueryValueEx(i $3, t'PATH', i 0, i 0, t.r1, *i 1024 r2) i.r4" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
System::Call "advapi32::RegCloseKey(i $3)" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "advapi32::RegCloseKey(i $3)" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
IntCmp $4 234 0 label_890 label_890 | |
DetailPrint "AddToPath: original length $2 > 1024" | |
MessageBox MB_OK "PATH not updated, original length $2 > 1024" | |
Goto label_921 | |
label_890: | |
IntCmp $4 0 label_895 | |
IntCmp $4 2 label_894 | |
DetailPrint "AddToPath: unexpected error code $4" | |
Goto label_921 | |
label_894: | |
StrCpy $1 "" | |
label_895: | |
Push $1; | |
Push $0; | |
Call func_927 | |
Pop $2 | |
StrCmp $2 "" 0 label_921 | |
Push $1; | |
Push $0\; | |
Call func_927 | |
Pop $2 | |
StrCmp $2 "" 0 label_921 | |
StrLen $2 $0 | |
StrLen $3 $1 | |
IntOp $2 $2 + $3 | |
IntOp $2 $2 + 2 | |
IntCmp $2 1024 label_913 label_913 | |
DetailPrint "AddToPath: new length $2 > 1024" | |
MessageBox MB_OK "PATH not updated, new length $2 > 1024." | |
Goto label_921 | |
label_913: | |
DetailPrint "Add to PATH: $0" | |
StrCpy $2 $1 1 -1 | |
StrCmp $2 ";" 0 label_917 | |
StrCpy $1 $1 -1 | |
label_917: | |
StrCmp $1 "" label_919 | |
StrCpy $0 $1;$0 | |
label_919: | |
WriteRegExpandStr HKCU Environment PATH $0 | |
SendMessage 0xFFFF 0x001A 0 STR:Environment /TIMEOUT=5000 | |
label_921: | |
Pop $4 | |
Pop $3 | |
Pop $2 | |
Pop $1 | |
Pop $0 | |
FunctionEnd | |
Function func_927 | |
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_939: | |
StrCpy $R5 $R2 $R3 $R4 | |
StrCmp $R5 $R1 label_944 | |
StrCmp $R5 "" label_944 | |
IntOp $R4 $R4 + 1 | |
Goto label_939 | |
label_944: | |
StrCpy $R1 $R2 "" $R4 | |
Pop $R5 | |
Pop $R4 | |
Pop $R3 | |
Pop $R2 | |
Exch $R1 | |
; Push $R1 | |
; Exch | |
; Pop $R1 | |
FunctionEnd | |
Function func_953 | |
Goto label_955 | |
SetOutPath $INSTDIR | |
label_955: | |
System::Store S | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push S | |
; CallInstDLL $PLUGINSDIR\System.dll Store | |
Pop $9 | |
System::Call ole32::CoCreateInstance(g'{00021401-0000-0000-C000-000000000046}',i0,i1,g'{000214EE-0000-0000-C000-000000000046}',*i.r1)i.r0 | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push ole32::CoCreateInstance(g'{00021401-0000-0000-C000-000000000046}',i0,i1,g'{000214EE-0000-0000-C000-000000000046}',*i.r1)i.r0 | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
IntCmp $0 0 0 label_1017 label_1017 | |
System::Call $1->0(g'{0000010b-0000-0000-c000-000000000046}',*i.r2)i.r0 | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push $1->0(g'{0000010b-0000-0000-c000-000000000046}',*i.r2)i.r0 | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
IntCmp $0 0 0 label_1012 label_1012 | |
System::Call "$2->5(w '$9',i 0)i.r0" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "$2->5(w '$9',i 0)i.r0" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
IntCmp $0 0 0 label_1012 label_1012 | |
System::Call $1->0(g'{45e2b4ae-b1c3-11d0-b92f-00a0c90312e1}',*i.r3)i.r0 | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push $1->0(g'{45e2b4ae-b1c3-11d0-b92f-00a0c90312e1}',*i.r3)i.r0 | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
IntCmp $0 0 0 label_1007 label_1007 | |
System::Call $3->6(*i.r4)i.r0 | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push $3->6(*i.r4)i.r0 | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
IntCmp $0 0 0 label_1002 label_1002 | |
System::Call "$3->7(i $4|0x2000)i.r0" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "$3->7(i $4|0x2000)i.r0" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
IntCmp $0 0 0 label_1002 label_1002 | |
System::Call "$2->6(w '$9',i1)i.r0" | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push "$2->6(w '$9',i1)i.r0" | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
label_1002: | |
System::Call $3->2() | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push $3->2() | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
label_1007: | |
System::Call $2->2() | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push $2->2() | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
label_1012: | |
System::Call $1->2() | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push $1->2() | |
; CallInstDLL $PLUGINSDIR\System.dll Call | |
label_1017: | |
IntCmp $0 0 label_1020 | |
DetailPrint "Set RunAsAdmin: $9 failed ($0)" | |
Goto label_1021 | |
label_1020: | |
DetailPrint "Set RunAsAdmin: $9" | |
label_1021: | |
System::Store L | |
; Call Initialize_____Plugins | |
; File $PLUGINSDIR\System.dll | |
; SetDetailsPrint lastused | |
; Push L | |
; CallInstDLL $PLUGINSDIR\System.dll Store | |
FunctionEnd | |
/* | |
Function Initialize_____Plugins | |
SetDetailsPrint none | |
StrCmp $PLUGINSDIR "" 0 label_1037 | |
Push $0 | |
SetErrors | |
GetTempFileName $0 | |
Delete $0 | |
CreateDirectory $0 ; !!!! Unknown Params: $0 "" ProgramFilesDir ; 221 0 1 | |
IfErrors label_1038 | |
StrCpy $PLUGINSDIR $0 | |
Pop $0 | |
label_1037: | |
Return | |
label_1038: | |
MessageBox MB_OK|MB_ICONSTOP "Error! Can't initialize plug-ins directory. Please try again later." /SD IDOK | |
Quit | |
FunctionEnd | |
*/ | |
; -------------------- | |
; UNREFERENCED STRINGS: | |
/* | |
17 CommonFilesDir | |
49 $PROGRAMFILES | |
53 "$PROGRAMFILES\Common Files" | |
70 $COMMONFILES | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment