diff --git a/Installer/.gitignore b/Installer/.gitignore new file mode 100644 index 0000000..878deaa --- /dev/null +++ b/Installer/.gitignore @@ -0,0 +1 @@ +/*.msi diff --git a/Installer/Binary/DefBannerBitmap b/Installer/Binary/DefBannerBitmap new file mode 100644 index 0000000..743af60 Binary files /dev/null and b/Installer/Binary/DefBannerBitmap differ diff --git a/Installer/Binary/MSVBDPCADLL b/Installer/Binary/MSVBDPCADLL new file mode 100644 index 0000000..fbf6cdc Binary files /dev/null and b/Installer/Binary/MSVBDPCADLL differ diff --git a/Installer/Binary/NewFldrBtn b/Installer/Binary/NewFldrBtn new file mode 100644 index 0000000..06ce56d Binary files /dev/null and b/Installer/Binary/NewFldrBtn differ diff --git a/Installer/Binary/UpFldrBtn b/Installer/Binary/UpFldrBtn new file mode 100644 index 0000000..045be0d Binary files /dev/null and b/Installer/Binary/UpFldrBtn differ diff --git a/Installer/Binary/VSDNETCFG b/Installer/Binary/VSDNETCFG new file mode 100644 index 0000000..1d8a318 --- /dev/null +++ b/Installer/Binary/VSDNETCFG @@ -0,0 +1,186 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Installer/EmbroideryReader.wxs b/Installer/EmbroideryReader.wxs new file mode 100644 index 0000000..4f0885f --- /dev/null +++ b/Installer/EmbroideryReader.wxs @@ -0,0 +1,834 @@ + + + + + + + + + + + + + + + OLD_INSTALL = null + + + + + + + + + + + + + VSDFXAvailable + [VSDNETURLMSG] + http://go.microsoft.com/fwlink/?LinkId=131000 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Will be installed on local hard drive + This feature frees up [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures free up [4] on your hard drive. + This feature will remain to be run from the network + This feature will change from run from network state to be installed on the local hard drive + This feature will change from run from network state to set to be installed when required + This feature will be uninstalled completely, you won't be able to run it from the network + This feature will remain uninstalled + Gathering required information... + Will be installed to run from CD + This feature frees up [1] on your hard drive. + This feature will change from run from CD state to be installed on the local hard drive + Entire feature will be unavailable + This feature will change from run from CD state to set to be installed when required + Entire feature will be installed to run from network + This feature will be removed from your local hard drive, but will be still available to run from the network + This feature will be available to run from the network + Entire feature will be installed on local hard drive + This feature will be installed on your local hard drive + Entire feature will be installed to run from CD + This feature will be uninstalled completely, you won't be able to run it from CD + Feature will be installed when required + This feature will be available to run from CD + bytes + Will be installed when required + + MB + This feature will become unavailable + KB + GB + This feature will be installed to run from the network + This feature will be installed to run from CD + This feature will be set to be installed when required + This feature will be installed on the local hard drive + This feature will remain to be run from CD + Folder|New Folder + Will be installed to run from network + This feature will be removed from your local hard drive, but will be still available to run from CD + This feature will be completely removed + Compiling cost for this feature... + This feature will remain on you local hard drive + This feature requires [1] on your hard drive. + This feature will be removed from your local hard drive, but will be set to be installed when required + This feature frees up [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures require [4] on your hard drive. + This feature requires [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures free up [4] on your hard drive. + This feature requires [1] on your hard drive. It has [2] of [3] subfeatures selected. The subfeatures require [4] on your hard drive. + Time remaining: {[1] minutes }{[2] seconds} + Available + Difference + Required + Disk Size + Volume + + + 1 + + + + + + + + + REMOVE<>"" + REMOVE="" + + + REMOVE="" + REMOVE<>"" + + + + + 1 + + + + + + + + + REMOVE="" + REMOVE<>"" + + + REMOVE<>"" + REMOVE="" + + + + + MaintenanceForm_Action="Repair" + MaintenanceForm_Action="Repair" + MaintenanceForm_Action="Remove" + MaintenanceForm_Action="Remove" + 1 + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + 1 + + + + + + + + + REMOVE<>"" + REMOVE="" + + + REMOVE="" + REMOVE<>"" + + + + + 1 + + + + + + + + + REMOVE="" + REMOVE<>"" + + + REMOVE<>"" + REMOVE="" + + + + + AdminMaintenanceForm_Action="Repair" + AdminMaintenanceForm_Action="Repair" + AdminMaintenanceForm_Action="Remove" + AdminMaintenanceForm_Action="Remove" + 1 + + + + + + + + + + + + + + + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + REMOVE="" + REMOVE<>"" + + + REMOVE<>"" + REMOVE="" + + + REMOVE<>"" + REMOVE="" + + + REMOVE="" + REMOVE<>"" + + + + + + + + + + + + + + WelcomeForm_NextArgs="" + WelcomeForm_NextArgs<>"" + + + + + + WelcomeForm_PrevArgs="" + WelcomeForm_PrevArgs<>"" + WelcomeForm_PrevArgs<>"" + + + + + + + + + + + 1 + OutOfDiskSpace=1 + FolderForm_NextArgs="" AND OutOfDiskSpace<>1 + FolderForm_NextArgs<>"" AND OutOfDiskSpace<>1 + FolderForm_AllUsers="ALL" AND VersionNT>=400 AND Privileged=1 AND FolderForm_AllUsersVisible=1 + FolderForm_AllUsers="ME" AND VersionNT>=400 AND Privileged=1 AND FolderForm_AllUsersVisible=1 + 1 + + + + + 1 + 1 + + + 1 + 1 + + + VersionNT>=400 AND Privileged=1 AND FolderForm_AllUsersVisible=1 + NOT (VersionNT>=400 AND Privileged=1 AND FolderForm_AllUsersVisible=1) + + + + + + FolderForm_PrevArgs="" + FolderForm_PrevArgs<>"" + FolderForm_PrevArgs<>"" + + + + + + + + VersionNT>=400 AND Privileged=1 AND FolderForm_AllUsersVisible=1 + NOT (VersionNT>=400 AND Privileged=1 AND FolderForm_AllUsersVisible=1) + + + + + + + + + OutOfDiskSpace<>1 + OutOfDiskSpace=1 + + + OutOfDiskSpace=1 + OutOfDiskSpace<>1 + + + + + 1 + 1 + + + 1 + 1 + + + + + 1 + + + 1 + + + + + + + + ConfirmInstallForm_NextArgs="" + ConfirmInstallForm_NextArgs<>"" + + + + + + ConfirmInstallForm_PrevArgs="" + ConfirmInstallForm_PrevArgs<>"" + ConfirmInstallForm_PrevArgs<>"" + + + + + + + + + + 1 + + + + + + + + + REMOVE<>"" + REMOVE="" + + + REMOVE="" + REMOVE<>"" + + + REMOVE="" + REMOVE<>"" + + + + + + + + + + + + + + + + + + + + + + + + + + + + REMOVE="" + REMOVE<>"" + + + REMOVE<>"" + REMOVE="" + + + REMOVE<>"" + REMOVE="" + + + REMOVE="" + REMOVE<>"" + + + + + 1 + + + + + + + + + REMOVE<>"" + REMOVE="" + + + REMOVE="" + REMOVE<>"" + + + + + 1 + OutOfDiskSpace=1 + AdminFolderForm_NextArgs="" AND OutOfDiskSpace<>1 + AdminFolderForm_NextArgs<>"" AND OutOfDiskSpace<>1 + AdminFolderForm_AllUsers="ALL" + + + + + 1 + 1 + + + 1 + 1 + + + + + + AdminFolderForm_PrevArgs="" + AdminFolderForm_PrevArgs<>"" + AdminFolderForm_PrevArgs<>"" + + + + + + + + + + AdminConfirmInstallForm_NextArgs="" + AdminConfirmInstallForm_NextArgs<>"" + + + + + + AdminConfirmInstallForm_PrevArgs="" + AdminConfirmInstallForm_PrevArgs<>"" + AdminConfirmInstallForm_PrevArgs<>"" + + + + + + + + + + AdminWelcomeForm_NextArgs="" + AdminWelcomeForm_NextArgs<>"" + + + + + + AdminWelcomeForm_PrevArgs="" + AdminWelcomeForm_PrevArgs<>"" + AdminWelcomeForm_PrevArgs<>"" + + + + + + + + Installed="" AND NOT RESUME + Installed<>"" OR RESUME + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + REMOVE="" + REMOVE<>"" + + + REMOVE<>"" + REMOVE="" + + + + + + + + + + NEWERPRODUCTFOUND AND NOT Installed + NOT Installed + TARGETDIR="" + NEWERPRODUCTFOUND + NOT Installed + + + NOT Installed + NOT Installed + + + + RedirectedDllSupport + + NOT Installed + + + NOT Installed + + + + VersionNT + VersionNT + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + VersionNT + VersionNT + + + + + + + + + + + + + + ProductState=1 + NOT Installed + TARGETDIR="" + Installed="" AND NOT RESUME AND ALLUSERS=1 + NEWERPRODUCTFOUND + NOT HideFatalErrorForm + + + Installed="" AND RESUME + Installed<>"" + Installed="" AND NOT RESUME + + NOT Installed + + NOT Installed + NOT Installed + + + + RedirectedDllSupport + + + + + TARGETDIR="" + + + + + + + + + + + TARGETDIR="" + + + + Installed="" AND RESUME + Installed<>"" + Installed="" AND NOT RESUME + + + + + + + + + + TARGETDIR="" + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/install/DotNET.nsh b/install/DotNET.nsh deleted file mode 100644 index ef980c9..0000000 --- a/install/DotNET.nsh +++ /dev/null @@ -1,219 +0,0 @@ -# DotNET and MSI version checking macro. -# Written by AnarkiNet(AnarkiNet@gmail.com) originally, modified by eyal0 (for use in http://www.sourceforge.net/projects/itwister) -# MSI check code based on http://www.codeproject.com/useritems/NSIS.asp -# Downloads the MSI version 3.1 and runs it if the user does not have the correct version. -# Downloads and runs the Microsoft .NET Framework version 2.0 Redistributable and runs it if the user does not have the correct version. -# To use, call the macro with a string: -# !insertmacro CheckDotNET "2" -# !insertmacro CheckDotNET "2.0.9" -# (Version 2.0.9 is less than version 2.0.10.) -# All register variables are saved and restored by CheckDotNet -# No output - -!macro CheckDotNET DotNetReqVer - !define DOTNET_URL "http://www.microsoft.com/downloads/info.aspx?na=90&p=&SrcDisplayLang=en&SrcCategoryId=&SrcFamilyId=0856eacb-4362-4b0d-8edd-aab15c5e04f5&u=http%3a%2f%2fdownload.microsoft.com%2fdownload%2f5%2f6%2f7%2f567758a3-759e-473e-bf8f-52154438565a%2fdotnetfx.exe" - !define MSI31_URL "http://download.microsoft.com/download/1/4/7/147ded26-931c-4daf-9095-ec7baf996f46/WindowsInstaller-KB893803-v2-x86.exe" - - DetailPrint "Checking your .NET Framework version..." - ;callee register save - Push $0 - Push $1 - Push $2 - Push $3 - Push $4 - Push $5 - Push $6 ;backup of intsalled ver - Push $7 ;backup of DoNetReqVer - - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - ; MSI ; - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - GetDLLVersion "$SYSDIR\msi.dll" $R0 $R1 - IntOp $R2 $R0 / 0x00010000 ; $R2 now contains major version - IntOp $R3 $R0 & 0x0000FFFF ; $R3 now contains minor version - IntOp $R4 $R1 / 0x00010000 ; $R4 now contains release - IntOp $R5 $R1 & 0x0000FFFF ; $R5 now contains build - StrCpy $0 "$R2.$R3.$R4.$R5" ; $0 now contains string like "1.2.0.192" - - ${If} $R2 < '3' - ;options - SetOutPath "$TEMP" - SetOverwrite on - - MessageBox MB_YESNOCANCEL|MB_ICONEXCLAMATION \ - "Your MSI version: $0.$\nRequired Version: 3 or greater.$\nDownload MSI version from www.microsoft.com?" \ - /SD IDYES IDYES DownloadMSI IDNO NewMSI - goto GiveUpDotNET ;IDCANCEL - - ${Else} - - DetailPrint "MSI3.1 already installed" - goto NewMSI - ${EndIf} - -DownloadMSI: - DetailPrint "Beginning download of MSI3.1." - NSISDL::download ${MSI31_URL} "$TEMP\WindowsInstaller-KB893803-v2-x86.exe" - DetailPrint "Completed download." - Pop $0 - ${If} $0 == "cancel" - MessageBox MB_YESNO|MB_ICONEXCLAMATION \ - "Download cancelled. Continue Installation?" \ - IDYES NewMSI IDNO GiveUpDotNET - ${ElseIf} $0 != "success" - MessageBox MB_YESNO|MB_ICONEXCLAMATION \ - "Download failed:$\n$0$\n$\nContinue Installation?" \ - IDYES NewMSI IDNO GiveUpDotNET - ${EndIf} - DetailPrint "Pausing installation while downloaded MSI3.1 installer runs." - ExecWait '$TEMP\WindowsInstaller-KB893803-v2-x86.exe /quiet /norestart' $0 - DetailPrint "Completed MSI3.1 install/update. Exit code = '$0'. Removing MSI3.1 installer." - Delete "$TEMP\WindowsInstaller-KB893803-v2-x86.exe" - DetailPrint "MSI3.1 installer removed." - goto NewMSI - -NewMSI: - DetailPrint "MSI3.1 installation done. Proceeding with remainder of installation." - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - ; NetFX ; - ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - StrCpy $7 ${DotNetReqVer} - - System::Call "mscoree::GetCORVersion(w .r0, i ${NSIS_MAX_STRLEN}, *i r2r2) i .r1 ?u" - - ${If} $0 == 0 - DetailPrint ".NET Framework not found, download is required for program to run." - Goto NoDotNET - ${ElseIf} $0 == "" - DetailPrint ".NET Framework not found, download is required for program to run." - Goto NoDotNET - ${EndIf} - - ;at this point, $0 has maybe v2.345.678. - StrCpy $0 $0 $2 1 ;remove the starting "v", $0 has the installed version num as a string - StrCpy $6 $0 - StrCpy $1 $7 ;$1 has the requested verison num as a string - - ;MessageBox MB_OKCANCEL "found $0" IDCANCEL GiveUpDotNET - - ;MessageBox MB_OKCANCEL "looking for $1" IDCANCEL GiveUpDotNET - - ;now let's compare the versions, installed against required ... - ${Do} - StrCpy $2 "" ;clear out the installed part - StrCpy $3 "" ;clear out the required part - - ${Do} - ${If} $0 == "" ;if there are no more characters in the version - StrCpy $4 "." ;fake the end of the version string - ${Else} - StrCpy $4 $0 1 0 ;$4 = character from the installed ver - ${If} $4 != "." - StrCpy $0 $0 ${NSIS_MAX_STRLEN} 1 ;remove that first character from the remaining - ${EndIf} - ${EndIf} - - ${If} $1 == "" ;if there are no more characters in the version - StrCpy $5 "." ;fake the end of the version string - ${Else} - StrCpy $5 $1 1 0 ;$5 = character from the required ver - ${If} $5 != "." - StrCpy $1 $1 ${NSIS_MAX_STRLEN} 1 ;remove that first character from the remaining - ${EndIf} - ${EndIf} - ;MessageBox MB_OKCANCEL "installed $2,$4,$0 required $3,$5,$1" IDCANCEL GiveUpDotNET - ${If} $4 == "." - ${AndIf} $5 == "." - ${ExitDo} ;we're at the end of the part - ${EndIf} - - ${If} $4 == "." ;if we're at the end of the current installed part - StrCpy $2 "0$2" ;put a zero on the front - ${Else} ;we have another character - StrCpy $2 "$2$4" ;put the next character on the back - ${EndIf} - ${If} $5 == "." ;if we're at the end of the current required part - StrCpy $3 "0$3" ;put a zero on the front - ${Else} ;we have another character - StrCpy $3 "$3$5" ;put the next character on the back - ${EndIf} - ${Loop} - ;MessageBox MB_OKCANCEL "finished parts: installed $2,$4,$0 required $3,$5,$1" IDCANCEL GiveUpDotNET - - ${If} $0 != "" ;let's remove the leading period on installed part if it exists - StrCpy $0 $0 ${NSIS_MAX_STRLEN} 1 - ${EndIf} - ${If} $1 != "" ;let's remove the leading period on required part if it exists - StrCpy $1 $1 ${NSIS_MAX_STRLEN} 1 - ${EndIf} - - ;$2 has the installed part, $3 has the required part - ${If} $2 S< $3 - IntOp $0 0 - 1 ;$0 = -1, installed less than required - ${ExitDo} - ${ElseIf} $2 S> $3 - IntOp $0 0 + 1 ;$0 = 1, installed greater than required - ${ExitDo} - ${ElseIf} $2 == "" - ${AndIf} $3 == "" - IntOp $0 0 + 0 ;$0 = 0, the versions are identical - ${ExitDo} - ${EndIf} ;otherwise we just keep looping through the parts - ${Loop} - - ${If} $0 < 0 - DetailPrint ".NET Framework Version found: $6, but is older than the required version: $7" - Goto OldDotNET - ${Else} - DetailPrint ".NET Framework Version found: $6, equal or newer to required version: $7." - Goto NewDotNET - ${EndIf} - -NoDotNET: - MessageBox MB_YESNOCANCEL|MB_ICONEXCLAMATION \ - ".NET Framework not installed.$\nRequired Version: $7 or greater.$\nDownload .NET Framework version from www.microsoft.com?" \ - /SD IDYES IDYES DownloadDotNET IDNO NewDotNET - goto GiveUpDotNET ;IDCANCEL -OldDotNET: - MessageBox MB_YESNOCANCEL|MB_ICONEXCLAMATION \ - "Your .NET Framework version: $6.$\nRequired Version: $7 or greater.$\nDownload .NET Framework version from www.microsoft.com?" \ - /SD IDYES IDYES DownloadDotNET IDNO NewDotNET - goto GiveUpDotNET ;IDCANCEL - -DownloadDotNET: - DetailPrint "Beginning download of latest .NET Framework version." - NSISDL::download ${DOTNET_URL} "$TEMP\dotnetfx.exe" - DetailPrint "Completed download." - Pop $0 - ${If} $0 == "cancel" - MessageBox MB_YESNO|MB_ICONEXCLAMATION \ - "Download cancelled. Continue Installation?" \ - IDYES NewDotNET IDNO GiveUpDotNET - ${ElseIf} $0 != "success" - MessageBox MB_YESNO|MB_ICONEXCLAMATION \ - "Download failed:$\n$0$\n$\nContinue Installation?" \ - IDYES NewDotNET IDNO GiveUpDotNET - ${EndIf} - DetailPrint "Pausing installation while downloaded .NET Framework installer runs." - ExecWait '$TEMP\dotnetfx.exe /q /c:"install /q"' - DetailPrint "Completed .NET Framework install/update. Removing .NET Framework installer." - Delete "$TEMP\dotnetfx.exe" - DetailPrint ".NET Framework installer removed." - goto NewDotNet - -GiveUpDotNET: - Abort "Installation cancelled by user." - -NewDotNET: - DetailPrint "Proceeding with remainder of installation." - Pop $0 - Pop $1 - Pop $2 - Pop $3 - Pop $4 - Pop $5 - Pop $6 ;backup of intsalled ver - Pop $7 ;backup of DoNetReqVer -!macroend \ No newline at end of file diff --git a/install/copyfiles.txt b/install/copyfiles.txt deleted file mode 100644 index 92207c4..0000000 --- a/install/copyfiles.txt +++ /dev/null @@ -1,4 +0,0 @@ -..\embroideryReader\bin\Release\embroideryReader.exe -..\embroideryReader\IniFile.dll -..\embroideryReader\UpdateCheck.dll -..\PesFile\bin\Release\PesFile.dll \ No newline at end of file diff --git a/install/embreader.nsi b/install/embreader.nsi deleted file mode 100644 index ee84f8f..0000000 --- a/install/embreader.nsi +++ /dev/null @@ -1,166 +0,0 @@ -; example2.nsi -; -; This script is based on example1.nsi, but it remember the directory, -; has uninstall support and (optionally) installs start menu shortcuts. -; -; It will install example2.nsi into a directory that the user selects, - -!include LogicLib.nsh -!include "DotNET.nsh" -#define DOTNET_VERSION "2.0" - -;-------------------------------- - -; The name of the installer -Name "Embroidery Reader" - -; The file to write -OutFile "embroideryReadervvv-setup.exe" - -; Request admin privileges -RequestExecutionLevel admin - -; The default installation directory -InstallDir "$PROGRAMFILES\Embroidery Reader" -; Registry key to check for directory (so if you install again, it will -; overwrite the old one automatically) -InstallDirRegKey HKLM "Software\Embroidery Reader" "Install_Dir" - -;-------------------------------- - -; Pages - -Page components -Page directory -Page instfiles - -UninstPage uninstConfirm -UninstPage instfiles - -;-------------------------------- - -; The stuff to install -Section "Embroidery Reader (required)" - # call userInfo plugin to get user info. The plugin puts the result in the stack - userInfo::getAccountType - - # pop the result from the stack into $0 - pop $0 - - # compare the result with the string "Admin" to see if the user is admin. - # If match, jump 3 lines down. - strCmp $0 "Admin" +3 - - # if there is not a match, print message and return - messageBox MB_OK "Embroidery Reader requires administrator privileges to install." - return - - SetShellVarContext all - SectionIn RO - - ;check for .net 2 - !insertmacro CheckDotNet "2.0" - - ; Set output path to the installation directory. - SetOutPath $INSTDIR - - ; Put file there - File "embroideryReader.exe" - File "IniFile.dll" - File "PesFile.dll" - File "UpdateCheck.dll" - - ; Write the installation path into the registry - WriteRegStr HKLM "SOFTWARE\Embroidery Reader" "Install_Dir" "$INSTDIR" - - ; Write the uninstall keys for Windows - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Embroidery Reader" "DisplayName" "Embroidery Reader" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Embroidery Reader" "UninstallString" '"$INSTDIR\uninstall.exe"' - WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Embroidery Reader" "NoModify" 1 - WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Embroidery Reader" "NoRepair" 1 - WriteUninstaller "uninstall.exe" - -SectionEnd - -; Optional section (can be disabled by the user) -Section "Start Menu Shortcuts" - SetShellVarContext all - CreateDirectory "$SMPROGRAMS\Embroidery Reader" - CreateShortCut "$SMPROGRAMS\Embroidery Reader\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 - CreateShortCut "$SMPROGRAMS\Embroidery Reader\Embroidery Reader.lnk" "$INSTDIR\embroideryReader.exe" "" "$INSTDIR\embroideryReader.exe" 0 - -SectionEnd - -Section "Associate with .PES files" - SetShellVarContext all - ; back up old value of .pes -!define Index "Line${__LINE__}" - ReadRegStr $1 HKCR ".pes" "" - StrCmp $1 "" "${Index}-NoBackup" - StrCmp $1 "EmbroideryDesign" "${Index}-NoBackup" - WriteRegStr HKCR ".pes" "backup_val" $1 -"${Index}-NoBackup:" - WriteRegStr HKCR ".pes" "" "EmbroideryDesign" - ReadRegStr $0 HKCR "EmbroideryDesign" "" - StrCmp $0 "" 0 "${Index}-Skip" - WriteRegStr HKCR "EmbroideryDesign" "" "Embroidery Design File" - WriteRegStr HKCR "EmbroideryDesign\shell" "" "open" - WriteRegStr HKCR "EmbroideryDesign\DefaultIcon" "" "$INSTDIR\embroideryReader.exe,0" -"${Index}-Skip:" - WriteRegStr HKCR "EmbroideryDesign\shell\open\command" "" '$INSTDIR\embroideryReader.exe "%1"' - - System::Call 'Shell32::SHChangeNotify(i 0x8000000, i 0, i 0, i 0)' -!undef Index - -SectionEnd - -;-------------------------------- - -; Uninstaller - -Section "Uninstall" - SetShellVarContext all -;start of restore script -!define Index "Line${__LINE__}" - ReadRegStr $1 HKCR ".pes" "" - StrCmp $1 "EmbroideryDesign" 0 "${Index}-NoOwn" ; only do this if we own it - ReadRegStr $1 HKCR ".pes" "backup_val" - StrCmp $1 "" 0 "${Index}-Restore" ; if backup="" then delete the whole key - DeleteRegKey HKCR ".pes" - Goto "${Index}-NoOwn" -"${Index}-Restore:" - WriteRegStr HKCR ".pes" "" $1 - DeleteRegValue HKCR ".pes" "backup_val" - - DeleteRegKey HKCR "EmbroideryDesign" ;Delete key with association settings - - System::Call 'Shell32::SHChangeNotify(i 0x8000000, i 0, i 0, i 0)' -"${Index}-NoOwn:" -!undef Index - - - ; Remove registry keys - DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Embroidery Reader" - DeleteRegKey HKLM "SOFTWARE\Embroidery Reader" - - ; Remove obsolete files from previous versions, if they exist - Delete $INSTDIR\UpdateInstaller.exe - RMDir "$INSTDIR\update" - Delete $INSTDIR\nc_settings.dll - Delete $INSTDIR\embroideryreader.ini - Delete $INSTDIR\nc_Updater.dll - - ; Remove shortcuts, if any - Delete "$SMPROGRAMS\Embroidery Reader\Uninstall.lnk" - Delete "$SMPROGRAMS\Embroidery Reader\Embroidery Reader.lnk" - RMDir "$SMPROGRAMS\Embroidery Reader" - - ; Remove files and uninstaller - Delete $INSTDIR\embroideryReader.exe - Delete $INSTDIR\PesFile.dll - Delete $INSTDIR\UpdateCheck.dll - Delete $INSTDIR\IniFile.dll - Delete $INSTDIR\uninstall.exe - RMDir "$INSTDIR" - -SectionEnd