; Generated NSIS script file (generated by makensitemplate.phtml 0.21) ; by 65.173.88.136 on Nov 12 02 @ 18:21 ; Created by Beaver 11/12/2002 - This allows for the patching of MYProgram ; NOTE: this .NSI script is designed for NSIS v1.8+ Name "MYProgram Patch 1.01" OutFile "beta-patch1.0.1.exe" ; Some default compiler settings (uncomment and change at will): SetCompress auto ; (can be off or force) SetOverwrite off ; SetDatablockOptimize on ; (can be off) ; CRCCheck on ; (can be off) ; AutoCloseWindow false ; (can be true for the window go away automatically at end) ; ShowInstDetails hide ; (can be show to have them shown, or nevershow to disable) ; SetDateSave off ; (can be on to have files restored to their orginal date) !macro ExtractAndBackupIfNeeded FILE ONAME ClearErrors File "/oname=${ONAME}" "${FILE}" IfErrors 0 +3 Rename "$INSTDIR\${ONAME}" "$INSTDIRbackup\${ONAME}" File "/oname=${ONAME}" "${FILE}" !macroend InstallDir "$PROGRAMFILES\CMP\MYProgram" InstallDirRegKey HKEY_LOCAL_MACHINE "SOFTWARE\CMP\MYProgram 1.01" "" DirShow show ; (make this hide to not let the user change it) DirText "Select the directory you installed eTools in:" Section Backup CreateDirectory $INSTDIRbackup !insertmacro "ExtractAndBackupIfNeeded.txt" "outputname.st" # NSIS will only delete this dir if it's empty RMDir $INSTDIRbackup SectionEnd : end of backup Section "" ; (default section) SetOutPath "$INSTDIR" ; add files / whatever that need to be installed here. File /r C:\dev\MYProgram\*.* WriteRegStr HKEY_LOCAL_MACHINE "SOFTWARE\CMP\eTools Patch 1.01" "" "$INSTDIR" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\MYProgram Patch 1.01" "DisplayName" "eTools Patch 1.01 (remove only)" WriteRegStr HKEY_LOCAL_MACHINE "Software\Microsoft\Windows\CurrentVersion\Uninstall\MYProgram Patch 1.01" "UninstallString" '"$INSTDIR\uninst.exe"' ; write out uninstaller WriteUninstaller "$INSTDIR\uninst.exe" SectionEnd ; end of default section ; begin uninstall settings/section UninstallText "This will uninstall the eTools patch from your system" Section Uninstall ; add delete commands to delete whatever files/registry keys/etc you installed here. Delete "$INSTDIR\uninst.exe" DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\CMP\MyProgram Patch 1.01" DeleteRegKey HKEY_LOCAL_MACHINE "SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\MYProgram Patch 1.01" ;RMDir "$INSTDIR" SectionEnd ; end of uninstall section ; eof