; The name of the installer Name "BoxeeLauncher" ; The file to write OutFile "InstallBoxeeLauncher.exe" ; The default installation directory InstallDir $PROGRAMFILES\BoxeeLauncher ; Registry key to check for directory (so if you install again, it will ; overwrite the old one automatically) InstallDirRegKey HKLM "Software\BoxeeLauncher" "Install_Dir" ; Request application privileges for Windows Vista RequestExecutionLevel admin ;-------------------------------- ; Pages Page components Page directory Page instfiles UninstPage uninstConfirm UninstPage instfiles ;-------------------------------- ; The stuff to install Section "BoxeeLauncher" SectionIn RO ; Set output path to the installation directory. SetOutPath $INSTDIR ; Put file there File BoxeeLauncher\bin\Release\BoxeeLauncher.exe ; Write the installation path into the registry WriteRegStr HKLM SOFTWARE\BoxeeLauncher "Install_Dir" "$INSTDIR" ; Write the registry key redirecting ehshell.exe to BoxeeLauncher WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\ehshell.exe" "Debugger" '"$INSTDIR\BoxeeLauncher.exe"' ; Write the uninstall keys for Windows WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BoxeeLauncher" "DisplayName" "BoxeeLauncher" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BoxeeLauncher" "UninstallString" '"$INSTDIR\uninstall.exe"' WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BoxeeLauncher" "NoModify" 1 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BoxeeLauncher" "NoRepair" 1 WriteUninstaller "uninstall.exe" SectionEnd ; Optional "Portable Mode" section (can be disabled by the user) Section "Launch Boxee in Portable Mode" File BoxeeLaunchArgs.txt SectionEnd ;-------------------------------- ; Uninstaller Section "Uninstall" ; Remove registry keys DeleteRegKey HKLM "Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\ehshell.exe" DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\BoxeeLauncher" DeleteRegKey HKLM SOFTWARE\BoxeeLauncher ; Remove files and uninstaller Delete $INSTDIR\BoxeeLauncher.exe Delete $INSTDIR\BoxeeLaunchArgs.txt Delete $INSTDIR\uninstall.exe ; Remove directories used RMDir "$INSTDIR" SectionEnd