Skip to content
⌘ NSIS Forum Archive

Newbie Question..

4 posts

nickc1977#

Newbie Question..

Hi

I'm very new to creating installers and I'm looking for guidance. I just want to create a very basic installer where I have 5 files to copy to one folder and 3 files to copy to 2 other folders.. Been searching through the forum and the sample scripts but I'm struggling to work it out. No need for anything like registry entries or an uninstaller (maybe a need for a desktop shortcut though)

Can anyone give me a nudge in the right direction please?

Thanks in advance
Nutzzz#edited
The examples in the NSIS install folder are very helpful. Maybe look at
C:\Program Files (x86)\NSIS\Examples\Modern UI\StartMenu.nsi
The commands you want are: SetOutPath and File

For your desktop icon, you could make an optional section using Section (with /o) containing a call to CreateShortCut

Alternatively, if you don't need the Readme checkbox on the Finish page, you could re-use it for your desktop icon, e.g.:
!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_TEXT "Create Desktop shortcut"
!define MUI_FINISHPAGE_RUN_FUNCTION "DoDesktopShortcut"

Function DoDesktopShortcut
CreateShortCut "$DESKTOP\YourShortcut.lnk" "$INSTDIR\YourProgram.exe"
FunctionEnd
nickc1977#
Thank you for the pointer, I have now created an installer that does exactly what I need 😁