Archive: autorun/autostart


autorun/autostart
Hi,
Im looking for autostart or autorun function in NSIS.
Once i put in the CD with that EXE file, i need it to autorun or autoinstall without human been intervention.


See this. Set the file to open to be the NSIS installer you create.


This thread should help you make it autostart from the CD:

http://forums.winamp.com/showthread....hlight=autorun

To make it silent see SilentInstall in the documentation.


very short:

[autorun]
OPEN=path\cdstart.EXE
ICON=path\logo.ICO

script

; The name of the installer
Name "cdstart"

; The file to write
OutFile "cdstart.exe"

; closes the window after running
AutoCloseWindow true

; The stuff to install
Section "" ;
; your stuff here
;example: open windows explorer here
Exec '$windir\explorer.exe $exedir'

SectionEnd ; end the section


;)

Ok let me see if I understood:


OutFile "MyAutorun.exe"

!include "${NSISDIR}\Contrib\System\System.nsh"

Section -
StrCpy $1 "c:\"
System::Call '${sysGetDriveType}(r1) .r0'
DetailPrint "Boo: $1 $0"
IntCmp $0 5 0 notcddrive
MessageBox MB_OK "Drive $1 is a cd drive"
notcddrive:
SectionEnd

Solved CD Auto PLay
Code:

; save this part as autorun.inf
; this is it to autorun EXE files
[autorun]
; the executable must be in root Cd drive
open=install.exe
icon=whatever_icon_you_want.ico

Now another question:
I need to write this code in the "section" after .nsh or i can write everywhere???

Thank you


The last one in toooo simple and perfect.
Thank you a lot