home *** CD-ROM | disk | FTP | other *** search
- Name "Beep"
-
- ; The file to write
- OutFile "nbeep03.exe"
-
- InstallDir "$PROGRAMFILES\Nullsoft Beep"
-
- InstallDirRegKey HKLM "SOFTWARE\Nullsoft Beep" ""
-
- DirText "Choose a directory for Nullsoft Beep:"
-
- ShowInstDetails show
- ShowUnInstDetails show
-
- !macro killBeeps
- FindWindow $0 "#32770" "Nullsoft Beep v0.2 (Status Window)"
- StrCmp $0 0 nov02
- SendMessage $0 273 1001 0
- StrCpy $9 1
- DetailPrint "Closing running instance of Beep..."
- Sleep 1000
- nov02:
- FindWindow $0 "#32770" "Nullsoft Beep v0.3 (Status Window)"
- StrCmp $0 0 nov03
- SendMessage $0 273 1001 0
- StrCpy $9 1
- DetailPrint "Closing running instance of Beep..."
- Sleep 1000
- nov03:
- !macroend
-
- Section ""
- StrCpy $9 0
- !InsertMacro killBeeps
- SetOutPath $INSTDIR\Source
- File audio.cpp
- File beep.dsp
- File beep.dsw
- File beep.nsi
- File beepdll.dsp
- File beepdll.dsw
- File hookdll.c
- File icon1.ico
- File ipdh.h
- File main.cpp
- File resource.h
- File script1.rc
-
-
- SetOutPath $INSTDIR
- File Release\beep.exe
- File Release\beep.dll
-
- WriteRegStr HKLM "SOFTWARE\Nullsoft Beep" "" "$INSTDIR"
-
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Beep" "DisplayName" "Nullsoft Beep (remove only)"
- WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Beep" "UninstallString" '"$INSTDIR\uninst-beep.exe"'
- WriteUninstaller "$INSTDIR\uninst-beep.exe"
- IfFileExists "$SMPROGRAMS\Nullsoft Beep.lnk" nosc
- MessageBox MB_YESNO|MB_ICONQUESTION "Add Start Menu shortcut for Beep?" \
- IDNO nosc
- CreateShortCut "$SMPROGRAMS\Nullsoft Beep.lnk" "$INSTDIR\Beep.exe"
- nosc:
-
- StrCmp $9 1 noprompttorun
- MessageBox MB_YESNO|MB_ICONQUESTION "Run Nullsoft Beep now?" IDNO norun
- noprompttorun:
- Exec '"$INSTDIR\beep.exe"'
- norun:
-
-
-
- SectionEnd
-
- UninstallText "This will uninstall Nullsoft Beep. Hit next to continue."
-
- ; special uninstall section.
- Section "Uninstall"
- !InsertMacro killBeeps
- ; remove registry keys
- DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Beep"
- DeleteRegKey HKLM SOFTWARE\Beep
- DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Run" NullsoftBeep
- Delete $INSTDIR\beep.exe
- Delete $INSTDIR\beep.dll
- Delete $INSTDIR\uninst-beep.exe
- ; remove shortcuts, if any.
- Delete "$SMPROGRAMS\Nullsoft Beep.lnk"
- Delete $INSTDIR\Source\*.*
- RMDir "$INSTDIR\Source"
- RMDir "$INSTDIR"
- SectionEnd
-
- ; eof
-