; Script generated by the HM NIS Edit Script Wizard. ; HM NIS Edit Wizard helper defines !define PRODUCT_NAME "Visual Studio Add-In for Etch" !define PRODUCT_VERSION "0.95" !define PRODUCT_PUBLISHER "Cisco Systems, Inc." !define PRODUCT_WEB_SITE "http://www.cisco.com" !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}" !define PRODUCT_UNINST_ROOT_KEY "HKLM" !define ETCH_CS_ASSEMBLY_FOLDER "SOFTWARE\Microsoft\.NETFramework\AssemblyFolders\Etch" !define SHELL_FOLDERS "Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" !define VS_FOLDER "SOFTWARE\Microsoft\VisualStudio\8.0" ; MUI 1.67 compatible ------ !include "MUI.nsh" ; MUI Settings !define MUI_ABORTWARNING !define MUI_ICON "modern-install.ico" !define MUI_UNICON "modern-uninstall.ico" !define MUI_WELCOMEPAGE_TITLE_3LINES ; Welcome page !insertmacro MUI_PAGE_WELCOME ; Etch Installation Folder Var ETCH_HOME !define MUI_DIRECTORYPAGE_VARIABLE $ETCH_HOME !define MUI_PAGE_HEADER_TEXT "Etch Home Directory." !define MUI_PAGE_HEADER_SUBTEXT "Choose the folder in which Etch package is installed." !define MUI_DIRECTORYPAGE_TEXT_TOP "Please browse to Etch home directory." !define MUI_DIRECTORYPAGE_TEXT_DESTINATION "Etch home directory" !insertmacro MUI_PAGE_DIRECTORY ; Directory page !insertmacro MUI_PAGE_DIRECTORY ; Instfiles page !insertmacro MUI_PAGE_INSTFILES ; Finish page !insertmacro MUI_PAGE_FINISH ; Uninstaller pages !insertmacro MUI_UNPAGE_INSTFILES ; Language files !insertmacro MUI_LANGUAGE "English" ; MUI end ------ Name "${PRODUCT_NAME}" OutFile "VSAddInSetup.exe" InstallDir "$PROGRAMFILES\Visual Studio Add-In for Etch" ShowInstDetails hide ShowUnInstDetails hide XPStyle "on" RequestExecutionLevel admin Section "Visual Studio Add-In for Etch" SEC01 SetOutPath "$INSTDIR" SetOverwrite try File "EtchAddIn.dll" File "Etch.AddIn" File "VS2005_AddIn_User_Guide.rtf" WriteRegStr HKLM "${ETCH_CS_ASSEMBLY_FOLDER}" "" "$ETCH_HOME\lib" ReadRegStr $0 HKCU "${SHELL_FOLDERS}" Personal SetOutPath "$0\Visual Studio 2005\Addins\" SetOverwrite try File "EtchAddIn.dll" File "Etch.AddIn" SectionEnd Section -AdditionalIcons SetOutPath $INSTDIR CreateDirectory "$SMPROGRAMS\Visual Studio Add-In for Etch" CreateShortCut "$SMPROGRAMS\Visual Studio Add-In for Etch\User Guide.lnk" "$INSTDIR\VS2005_AddIn_User_Guide.rtf" CreateShortCut "$SMPROGRAMS\Visual Studio Add-In for Etch\Uninstall.lnk" "$INSTDIR\uninst.exe" SectionEnd Section -Post WriteUninstaller "$INSTDIR\uninst.exe" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayName" "$(^Name)" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString" "$INSTDIR\uninst.exe" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "DisplayVersion" "${PRODUCT_VERSION}" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "URLInfoAbout" "${PRODUCT_WEB_SITE}" WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "Publisher" "${PRODUCT_PUBLISHER}" SectionEnd Function un.onUninstSuccess HideWindow MessageBox MB_ICONINFORMATION|MB_OK "$(^Name) was successfully removed from your computer." ReadRegStr $0 HKLM "${VS_FOLDER}" InstallDir ExecWait '$0\devenv.exe /ResetAddin Etch' FunctionEnd Function un.onInit MessageBox MB_ICONQUESTION|MB_YESNO|MB_DEFBUTTON2 "Are you sure you want to completely remove $(^Name)?" IDYES +2 Abort FunctionEnd Section Uninstall MessageBox MB_ICONEXCLAMATION|MB_OK|MB_TOPMOST "Please close Visual Studio 2005 and click OK to continue." DeleteRegValue HKLM "${ETCH_CS_ASSEMBLY_FOLDER}" "" DeleteRegKey HKLM "${ETCH_CS_ASSEMBLY_FOLDER}" ReadRegStr $0 HKCU "${SHELL_FOLDERS}" Personal Delete "$0\Visual Studio 2005\Addins\EtchAddIn.dll" Delete "$0\Visual Studio 2005\Addins\Etch.AddIn" Delete "$INSTDIR\EtchAddIn.dll" Delete "$INSTDIR\Etch.AddIn" Delete "$INSTDIR\VS2005_AddIn_User_Guide.rtf" Delete "$INSTDIR\uninst.exe" Delete "$SMPROGRAMS\Visual Studio Add-In for Etch\User Guide.lnk" Delete "$SMPROGRAMS\Visual Studio Add-In for Etch\Uninstall.lnk" RMDir "$SMPROGRAMS\Visual Studio Add-In for Etch" DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" SetAutoClose true SectionEnd