Suggestion for improving NSIS 2
While i was working with NSIS, there are a few things that could be better.
First of all the documentation:
- You should add a paragraph describing the style, how the functions are explained ( "|" means or and "[ ]" means optional parameter ). I would like to know: If more than one parameter is optional, can i omit other parameters, when I only like to set the last one?
- You should document the usefull function GetWindowText (used in System.nsh).
- I can hand over more than one parameter to CallInstDll. The second one must be something like functionname. It's is not yet in the documentation.
- Apparently is is not possible to call SendMessage with WM_SETTEXT and the first parameter as LangString variable. Even if it begins with "STR:". It only works that way:
SendMessage<ID> ${WM_SETTEXT} 0 "STR:$(LangString)"
. Please add that info.- More information about SetRebootFlag? Is it only a variable or does the setup automatically reboot, if this flag is set? Is there a MessageBox asking the user, what to do?
- Modern User Interface: Add docu about !insertmacro MUI_LANGDLL_PUSH. Does the second parameter always have to be the lang. name in English?
Things regarding the code:
- One function should be able to be called from Install as well as Uninstall. That's not possible because every function called from Uninstall must begin with "un.".
- What about a function setting these entries in the registry. They add Uninstall information the the Control Panel -> Add/Remove Software. Especially the items NoRepair/NoModify made the "(only remove)" string unnecessary.
Windows
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\WinCD" "DisplayName" "${MUI_PRODUCT} ${MUI_VERSION}"
>WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\WinCD" "UninstallString" '"$INSTDIR\uninstall.exe"'
>WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\WinCD" "Publisher" "Konrad Windszus"
>WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\WinCD" "URLInfoAbout" "http://www.wincd.de"
>WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\WinCD" "URLUpdateInfo" "http://www.wincd.de"
>WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\WinCD" "HelpLink" "http://www.wincd.de"
>WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\WinCD" "DisplayVersion" "${MUI_VERSION}"
>WriteRegDWORD HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\WinCD" "NoModify" 1
WriteRegDWORD HKLM"Software\Microsoft\Windows\CurrentVersion\Uninstall\WinCD" "NoRepair" 1
>
- I would like to have another standard page for displaying readme files. I made changes to the license page, but that's very complicated. It should be also a rich edit control.- Another page with checkboxes for desktop and quicklaunch shortcuts would also be very nice. I made one page and I will supply it in the Archive.
- Last small thing. If you insert custom pages, the caption should start with ":" to be uniform to the others. Perhaps you could automatically add the ":" that the caption is only the raw caption like "Installation Folder" in DirPage.
At least thank you very much for that great work! NSIS is definitely the best installer for small projects!