; The name of the installer Name "XBMCLauncher" ; The file to write OutFile "InstallXBMCLauncher.exe" ; The default installation directory InstallDir $PROGRAMFILES\XBMCLauncher ; Registry key to check for directory (so if you install again, it will ; overwrite the old one automatically) InstallDirRegKey HKLM "Software\XBMCLauncher" "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 "XMBCLauncher" SectionIn RO ; Set output path to the installation directory. SetOutPath $INSTDIR ; Put file there File XbmcLauncher\bin\Release\XbmcLauncher.exe ; Write the installation path into the registry WriteRegStr HKLM SOFTWARE\XBMCLauncher "Install_Dir" "$INSTDIR" ; Write the registry key redirecting ehshell.exe to XBMCLauncher WriteRegStr HKLM "Software\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\ehshell.exe" "Debugger" '"$INSTDIR\XbmcLauncher.exe"' ; Write the uninstall keys for Windows WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\XMBCLauncher" "DisplayName" "XMBCLauncher" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\XMBCLauncher" "UninstallString" '"$INSTDIR\uninstall.exe"' WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\XMBCLauncher" "NoModify" 1 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\XMBCLauncher" "NoRepair" 1 WriteUninstaller "uninstall.exe" SectionEnd ; Optional "Portable Mode" section (can be disabled by the user) Section "Launch XBMC in Portable Mode" File XBMCLaunchArgs.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\XMBCLauncher" DeleteRegKey HKLM SOFTWARE\XMBCLauncher ; Remove files and uninstaller Delete $INSTDIR\XbmcLauncher.exe Delete $INSTDIR\XBMCLaunchArgs.txt Delete $INSTDIR\uninstall.exe ; Remove directories used RMDir "$INSTDIR" SectionEnd