Archive: How do you make a installer...


How do you make a installer...
that makes shortcuts on the desktop

I also just got this program and don't know how to apply a script in a .nsi file

(and is there a way to change the ICON of the .exe installer?)


Simple, in one of your installer sections use the CreateShortCut command, like this:

CreateShortCut "$DESKTOP\MyProgram.lnk" "$PROGRAMFILES\YourCompanyNameHere\MyProgram\MyProgram.exe"


But wait i don't know how to do that...


What do you mean by "how to apply a script"? A script is the installer file that directs the flow of the installer. It ends in an nsi extension. For examples look under the NSIS\Examples directory.

I believe you can change the icon using the MUI settings, asuming you're using the modern interface:

; MUI Settings
!define MUI_ABORTWARNING
!define MUI_ICON "C:\ProgramFiles\MyProgram\MyProgram.ico"
!define MUI_UNICON "C:\ProgramFiles\MyProgram\MyProgram.ico"


i know what the script is and i have them... But how do i use them

P.S. I don't get the shortcut thing... where would you put the code?


Read the manual that came with it.


You use NSIS to compile the script, which creates the installer exe. (It's in the manual - RTFM).

P.S. You put the code in the script.


ok i still don't get the shortcut thing where do you put the code????????


You put the code in one of your functions, or in a 'Section'. (If you still don't understand, you'll need to read more of the manual. Looking at the examples really helps as well. Load them into NSIS and run them and compare the code to understand what is causing what actions.) Good luck.


NSIS is a scripting language, not the usual list of files and registry keys. NSIS is really good for complex installations and things such as version checking, custom logic, custom pages, etc.

The best place to get started would be downloading HM NIS Edit, an open-source IDE for NSIS. It includes a script generation wizard and custom page designer.

If you're familiar with C[++]/Java[Script], etc, use LogicLib to make NSIS work more like those common programming languages.

Last, the example scripts (usually in C:\Program Files\NSIS\Examples) will get you started. To compile them, right click on the .NSI files and hit "Compile NSIS Script" and watch NSIS work its magic. Note that NSIS doesn't use a linker/object files/etc. so once you hit compile and the compiler finishes the EXE is ready.

hope you find NSIS as cool as I did - from a guy who's been using NSIS 3 1/2 years, and learned NSIS by examining the script file auto-generated by Zip2Exe.

-dandaman32


thank you for all the help guys