!verbose 4 OutFile "SecureCoop setup.exe" Name "SecureCoop" caption "SecureCoop" BrandingText " " InstallDir "$PROGRAMFILES64\SecureCoop" Icon "$EXEDIR/SecureCoop.ico" UninstallIcon "$EXEDIR/SecureCoop.ico" # For removing Start Menu shortcut in Windows 7+ RequestExecutionLevel admin #ShowInstDetails nevershow ShowUninstDetails nevershow Section SetOutPath $INSTDIR WriteUninstaller "$INSTDIR\uninstall.exe" SetOverwrite ifnewer File "$EXEDIR/dist/SecureCoop/*.*" File "$EXEDIR/SecureCoop.ico" CreateShortcut "$SMSTARTUP\SecureCoop.lnk" "$INSTDIR\SecureCoop.exe" "" "SecureCoop.ico" CreateDirectory "$SMPROGRAMS\SecureCoop" CreateShortcut "$SMPROGRAMS\SecureCoop\SecureCoop.lnk" "$INSTDIR\SecureCoop.exe" "" "SecureCoop.ico" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SecureCoop" "DisplayName" "SecureCoop" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SecureCoop" "UninstallString" "$\"$INSTDIR\uninstall.exe$\"" Exec '"$INSTDIR\SecureCoop.exe"' SectionEnd Section "uninstall" MessageBox MB_OKCANCEL "Do you want to uninstall?" IDOK label_for_ok IDCANCEL label_for_cancel label_for_ok: KillProcWMI::KillProc "SecureCoop.exe" Delete "$SMSTARTUP\SecureCoop.lnk" Delete "$SMPROGRAMS\SecureCoop\SecureCoop.lnk" RMDir /r $INSTDIR DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\SecureCoop" goto end_label label_for_cancel: goto end_label end_label: SectionEnd