Archive: Help me pls!!


Help me pls!!
Hi i am a newbie to programing and I am currently a student who has been posted to a company for attachment. My task in this company is to create an installation disk for one of its applications. First I have to create an installer to install a small batch file. It is a HelloWorld class which i created using java. But i have no idea how to package it into an installer. I have read the NSIS manual and have gone through the forum but don't understand most of the stuff there as the only programming knowledge I have is of Java. I hope you could give me some examples on how to make an installer for a batch file. Thanks!!


You can find scripts that help you inside Examples folder inside your NSIS dir, however I recommend looking inside Examples\Modern UI as the Modern UI adds more beauty to your installers.

The simplest installer you can create is this below:

OutFile a.exe

Section
SectionEnd

See what each of the scripts in the NSIS\Examples folder does. It's very easy to adapt an existing script. Also try the great wizard that comes with http://hmne.sourceforge.net/


Ok! Thanks for all your help.I really appreciate it.:)


Hey it's me again. I have a question regarding one of the examples given in the NSIS examples folder. This is from example2. Here's the code:

Section "Example2 (required)"

SectionIn RO

; Set output path to the installation directory.
SetOutPath $INSTDIR

; Put file there
File "..\makensisw.exe"

For the last line (File "..\makensisw.exe"), is the makensisw.exe a file that already exists, one that will be created by the installer or is it the file that i would like to include in my installer.

And also to change the directory of $INSTDIR i think i need to use StrCpy but i am not sure how to use it. Could someone give me an example on how to do this.

Thanks again!


is the makensisw.exe a file that already exists, one that will be created by the installer or is it the file that i would like to include in my installer.
It is a file that already exists, and the file that you would like to include in your installer:

  Quote from example2.nsi:
; Set output path to the installation directory.
SetOutPath $INSTDIR

; Put file there
File "..\makensisw.exe"

It will include the file makensisw.exe in the installer and extract it to $INSTDIR.
And also to change the directory of $INSTDIR i think i need to use StrCpy but i am not sure how to use it. Could someone give me an example on how to do this.
StrCpy $INSTDIR "C:\YourDir"

Ok thanks deguix...really appreciate your help.