; plugin_example.nsi ; ; This script will install your plugin and register it so Triton can load it ;-------------------------------- ; The name of the installer Name "plugin_example" ; The file to write OutFile "plugin_example.exe" ;-------------------------------- ; Sets the font of the installer SetFont "Comic Sans MS" 8 ;-------------------------------- ;Pages Page custom customPage Page instfiles UninstPage uninstConfirm UninstPage instfiles ;-------------------------------- ; The stuff to install Section "" ; Set output path to the installation directory. ;SetOutPath "Install Path" ; Put file there ;File "Dll File" ; Register your dll ; ClearErrors ;RegDll "Install Path" + "Dll File" ; Write the uninstall keys for Windows ;WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\"Plugin Name"" "DisplayName" "Plugin Name" ;WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\"Plugin Name"" "UninstallString" '"Install Path"\uninstall.exe"' ;WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\"Plugin Name"" "NoModify" 1 ;WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\"Plugin Name"" "NoRepair" 1 ;WriteUninstaller "Install Path"\uninstall.exe SectionEnd ; end the section ;-------------------------------- Function customPage ;MessageBox MB_YESNO 'Would you like to install "Plugin Name"?' IDYES yes ;Quit ;yes: FunctionEnd ;-------------------------------- ; Uninstaller Section "Uninstall" ; Remove registry keys ;DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\"Plugin Name"" ; Remove files and uninstaller ;UnRegDll "Install Path" + "Dll File" ;Delete "Install Path" + "Dll File" ;Delete "Install Path"\uninstall.exe ; Remove directories used ;RMDir "$INSTDIR" SectionEnd