NSIS Noob question!
I pieced this script together from examples I found in various locations. It now does just about everything I want to do with 2 exceptions:
- The publisher's name and file size do not appear in the control panel's "Programs and Features" list. How do I get these to show?
- I've seen a check box during install which allows me to uncheck the mail program's name, which of course I wouldn't do. But how to I get the desktop shortcut and the start menu shortcuts to also become optional?
Thanks, Bill
; QuikWAS.nsi
;--------------------------------
; The name of the installer
Name "QuickWAS"
; The file to write
OutFile "QuickSetup.exe"
; The default installation directory
InstallDir $PROGRAMFILES\QuickWAS
; Request application privileges for Windows Vista
RequestExecutionLevel admin
;--------------------------------
; Pages
Page components
Page directory
Page instfiles
; Page license
UninstPage uninstConfirm
UninstPage instfiles
;--------------------------------
; The stuff to install
Section "QuickWAS"
; SectionIn RO
; Set output path to the installation directory.
SetOutPath $INSTDIR
; Put file there
File "QuickWAS.exe"
; Write the uninstall keys for Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\QuickWAS" "DisplayName" "QuickWAS"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\QuickWAS" "UninstallString" '"$INSTDIR\uninstall.exe"'
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\QuickWAS" "NoModify" 1
WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\QuickWAS" "NoRepair" 1
WriteUninstaller "uninstall.exe"
; SectionEnd
; Section "install" Installation info
;create desktop shortcut
CreateShortCut "$DESKTOP\QuickWAS.lnk" "$INSTDIR\QuickWAS.exe" ""
;create start-menu items
CreateDirectory "$SMPROGRAMS\QuickWAS"
CreateShortCut "$SMPROGRAMS\QuickWAS\Uninstall.lnk" "$INSTDIR\Uninstall.exe" "" "$INSTDIR\Uninstall.exe" 0
CreateShortCut "$SMPROGRAMS\QuickWAS\QuickWAS.lnk" "$INSTDIR\QuickWAS.exe" "" "$INSTDIR\QuickWAS.exe" 0
SectionEnd
;--------------------------------
Section "Uninstall"
; Remove registry keys
DeleteRegKey HKCU "Software\AA4M Software"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\QuickWAS"
; Remove files and uninstaller
Delete $DESKTOP\QuickWAS.lnk
Delete $INSTDIR\QuickWAS.exe
Delete $INSTDIR\uninstall.exe
Delete $INSTDIR\*.was
; Remove shortcuts, if any
Delete "$SMPROGRAMS\QuickWAS\*.*"
; Remove directories used
RMDir "$SMPROGRAMS\QuickWAS"
RMDir "$INSTDIR"
SectionEnd