I'm looking a way to make an installer like visual studio

I didn't find anything on web regarding a way to create my custom plugin to do it.
Does anyone have a idea ?
Thanks
9 posts

This exact feature (creating Visual Studio like installers) was implemented in Graphical Installer some time ago.Originally Posted by Nutzzz View Post


Note that some defines start with UMUI_ for UltraModern as they're UMUI only, others with MUI_ as they're shared with Modern UI 2.!define MUI_COMPONENTSPAGE_SMALLDESC
!define UMUI_NOLEFTIMAGE
!define MUI_ABORTWARNING
!define MUI_UNABORTWARNING
!define UMUI_USE_ALTERNATE_PAGE
!define UMUI_USE_UNALTERNATE_PAGE
Name "Setup"
OutFile "Setup.exe"
InstallDir "$PROGRAMFILES\Setup"
SetCompressor /SOLID /FINAL lzma
!include "MUI2.nsh"
!include "WinCore.nsh"
!include "LogicLib.nsh"
!include "WinMessages.nsh"
!include "FileFunc.nsh"
RequestExecutionLevel Admin
ShowInstDetails hide
ShowInstDetails nevershow
ShowUnInstDetails nevershow
XPStyle off
BrandingText /TRIMRIGHT " "
Icon "Icons\appicon.ico"
!define MUI_ICON "Icons\appicon.ico"
!define MUI_UNICON "Icons\Uninstall.ico"
UninstallIcon "Icons\Uninstall.ico"
!define MUI_PAGE_CUSTOMFUNCTION_SHOW "PageWelcome"
!insertmacro MUI_PAGE_INSTFILES
!define MUI_PAGE_CUSTOMFUNCTION_SHOW "un.ModifyUnConfirm"
!insertmacro MUI_UNPAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
Function ".onInit"
InitPluginsDir
SetOverwrite try
AllowSkipFiles off
File "/ONAME=$PLUGINSDIR\DuiLib.dll" "Install\DuiLib.dll"
File "/oname=$PLUGINSDIR\inst.ui" "Install\inst.ui"
File "/ONAME=$PLUGINSDIR\installer-helper.dll" "Install\installer-helper.dll"
IfSilent +2 0
Push install
CallInstDLL $PLUGINSDIR\installer-helper.dll /NOUNLOAD InitUI
IfAbort 0 +2
Abort
CallInstDLL $PLUGINSDIR\installer-helper.dll /NOUNLOAD SetInstDir
IfAbort 0 +2
Abort
FunctionEnd
Function "PageWelcome"
CallInstDLL $PLUGINSDIR\installer-helper.dll /NOUNLOAD ShowUI
IfAbort 0 +2
Abort
CallInstDLL $PLUGINSDIR\installer-helper.dll /NOUNLOAD GetUIControlCode
IfAbort 0 +2
Abort
CallInstDLL $PLUGINSDIR\installer-helper.dll /NOUNLOAD GetInstDir
IfAbort 0 +2
Abort
Push 1
CallInstDLL $PLUGINSDIR\installer-helper.dll /NOUNLOAD SetNSISControlCode
CallInstDLL $PLUGINSDIR\installer-helper.dll /NOUNLOAD GetUIControlCode
FunctionEnd
Section ""
ClearErrors
SetShellVarContext "all"
SetOutPath "$INSTDIR"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Setup" "DisplayName" "Setup"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Setup" "UninstallString" "$INSTDIR\uninst.exe"
WriteUninstaller "$INSTDIR\uninst.exe"
SetAutoClose True
SectionEnd
Function ".onGUIEnd"
SetOutPath $PLUGINSDIR
FunctionEnd
Function "un.onInit"
InitPluginsDir
SetOverwrite try
AllowSkipFiles off
File "/ONAME=$PLUGINSDIR\DuiLib.dll" "Uninstall\DuiLib.dll"
File "/oname=$PLUGINSDIR\inst.ui" "Uninstall\inst.ui"
File "/ONAME=$PLUGINSDIR\installer-helper.dll" "Uninstall\installer-helper.dll"
SetShellVarContext all
IfSilent +2 0
Push uninstall
CallInstDLL $PLUGINSDIR\installer-helper.dll /NOUNLOAD InitUI
IfAbort 0 +2
Abort
FunctionEnd
Function "un.ModifyUnConfirm"
IfSilent 0 +2
Quit
CallInstDLL $PLUGINSDIR\installer-helper.dll /NOUNLOAD ShowUI
IfAbort 0 +2
Abort
CallInstDLL $PLUGINSDIR\installer-helper.dll /NOUNLOAD GetUIControlCode
IfAbort 0 +2
Abort
CallInstDLL $PLUGINSDIR\installer-helper.dll /NOUNLOAD GetInstDir
IfAbort 0 +2
Abort
Push 1
CallInstDLL $PLUGINSDIR\installer-helper.dll /NOUNLOAD SetNSISControlCode
CallInstDLL $PLUGINSDIR\installer-helper.dll /NOUNLOAD GetUIControlCode
FunctionEnd
Section "Uninstall"
ClearErrors
SetShellVarContext "all"
DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Setup"
SetShellVarContext "all"
RMDir /r "$INSTDIR"
SetAutoClose true
SectionEnd
Function "Un.onGUIEnd"
SetOutPath $PLUGINSDIR
FunctionEnd