Winamp & Shoutcast Forums

Winamp & Shoutcast Forums (http://forums.winamp.com/index.php)
-   NSIS Discussion (http://forums.winamp.com/forumdisplay.php?f=65)
-   -   Re:Onclick Installer (http://forums.winamp.com/showthread.php?t=262198)

hnmurugan 21st December 2006 08:46

Re:Onclick Installer
 
Dear All,

Just wondering whether my below request can be done using NSIS.

I am working in a computer DIY hardware shop and most of the time my job always requires me install same softwares like flash player,java,adobe reader,video lan, realplayer and antiirus softwares.

I am sick of click next buttons and i have to wait for softwares to be installed before start installing other softwares due some softwares don't allow.

But i have seen those application recovery cd's from HP and it will let you choose the softwares and it will install automatically using silent switches.

Is it possible to write a NSIS script that can hdo the same job as application recovery cd does?

Your inputs in this matter is greately appreciated.

Rgds/Hari

Red Wine 21st December 2006 11:35

It's possible and easy with NSIS.
All you have to do is to associate sections with applications that you wish to install (in my thought one section for every application). Find every application's command line switch for sillent installation and add it like this:
ExecWait '"$EXEDIR\app_setup.exe" silent_parameters'.
Compile and burn the installer and all needed applications to the root of a removable media.
Last but not least execute the installer from that media and from components page select the applications that you want to install according to the target machine and take your coffee time :-)

related:

Instructions

Sections

Pages

Modern UI

hnmurugan 22nd December 2006 00:15

thanks for your time and effort.I will try this during weekend .
Rgds/Hari

hnmurugan 24th December 2006 18:33

Dear Red Wine,

I have managed to get my first installer work successfully. Thanks for your help again.Here is my script below

Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
OutFile "Setup.exe"
InstallDir "$PROGRAMFILES"

Section "Java" SEC01
ExecWait '"Java\Java.exe" /qr'
SectionEnd

Section "Flash" SEC02
ExecWait "Flash\Flash.msi"
SectionEnd

Could you please answer below questions?

1.If you notice, section 2 got msi file and it does not execute. How do i call msiexec to execute this?

2.For the status message, it is displaying executing Java\Java.exe. Instead is it possible to replace with installing Java?

3.Another improvement - How do i compile my install file in to setup.exe and extract to $tmp then start the install from temp, after delete it.

Sorry to ask too much.

Rgds

Red Wine 24th December 2006 19:11

You're welcome!
Quote:

1.If you notice, section 2 got msi file and it does not execute. How do i call msiexec to execute this?
Use ExecShell open 'path_to_file\Flash.msi'


Quote:

2.For the status message, it is displaying executing Java\Java.exe. Instead is it possible to replace with installing Java?
See NSIS documentation 4.9.14.3 DetailPrint, 4.9.14.14 SetDetailsPrint etc.


Quote:

3.Another improvement - How do i compile my install file in to setup.exe and extract to $tmp then start the install from temp, after delete it.
Function .onInit
InitPluginsDir
File /oname=$PLUGINSDIR\Java.exe 'Local_path\java.exe'
...
...
FunctionEnd

Section "Java" SEC01
ExecWait '"$PLUGINSDIR\Java\Java.exe" /qr'
...
...
SectionEnd

$PLUGINSDIR removed once the installer is terminated.
See NSIS documentation 4.2.3 Constants and search the forum for examples.
Also don't forget wiki! http://nsis.sourceforge.net

Happy Holidays!

Red Wine 25th December 2006 07:25

I was not able to add these corrections to my other post above, so I put them here:
Quote:

1.If you notice, section 2 got msi file and it does not execute. How do i call msiexec to execute this?
If you want to WAIT for the proccess to terminate before continue then use:
ExecWait 'msiexec.exe /options "path_to_file\file.msi"'

Quote:

Section "Java" SEC01
ExecWait '"$PLUGINSDIR\Java\Java.exe" /qr'
...
...
SectionEnd
ExecWait '"$PLUGINSDIR\Java.exe" /qr'


All times are GMT. The time now is 04:18.

Copyright © 1999 - 2010 Nullsoft. All Rights Reserved.