Name "MV3D Tools" OutFile "..\mv3d-windows-tools-ogre.exe" InstallDir $PROGRAMFILES32\MV3D\Tools InstallDirRegKey HKLM "Software\MV3D\Tools" "Install_Dir" RequestExecutionLevel admin Page license Page components Page directory Page instfiles UninstPage uninstConfirm UninstPage instfiles LicenseText "MV3D is released under the MIT License:" LicenseData "..\LICENSE" Section "MV3D Tools (required)" SectionIn RO ; Set output path to the installation directory. SetOutPath $INSTDIR ; Put file there File /r "..\dist-tools\*.*" ; Write the installation path into the registry WriteRegStr HKLM SOFTWARE\MV3D\Tools "Install_Dir" "$INSTDIR" ; Write the uninstall keys for Windows WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MV3D_Tools" "DisplayName" "MV3D Tools" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MV3D_Tools" "UninstallString" '"$INSTDIR\uninstall.exe"' WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MV3D_Tools" "NoModify" 1 WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MV3D_Tools" "NoRepair" 1 WriteUninstaller "uninstall.exe" SectionEnd Section "Start Menu Shortcuts" CreateDirectory "$SMPROGRAMS\MV3D\Tools" CreateShortCut "$SMPROGRAMS\MV3D\Tools\Uninstall.lnk" "$INSTDIR\uninstall.exe" "" "$INSTDIR\uninstall.exe" 0 CreateShortCut "$SMPROGRAMS\MV3D\Tools\Composer2.lnk" "$INSTDIR\composer2.exe" "" "$INSTDIR\composer2.exe" 0 SectionEnd Section "DirectX Install" ExecWait "$INSTDIR\dxwebsetup.exe" SectionEnd Section "Visual C++ Redistributable Install" ExecWait "$INSTDIR\vcredist_x86.exe" SectionEnd ;-------------------------------- ; Uninstaller Section "Uninstall" ; Remove registry keys DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\MV3D_Tools" DeleteRegKey HKLM SOFTWARE\MV3D\Tools ; Remove files and uninstaller Delete $INSTDIR\*.* ; Remove shortcuts, if any Delete "$SMPROGRAMS\MV3D\Tools\*.*" ; Remove directories used RMDir "$SMPROGRAMS\MV3D\Tools" RMDir "$INSTDIR" SectionEnd