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.
autorun/autostart
6 posts
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:
To make it silent see SilentInstall in the documentation.
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.
To make it silent see SilentInstall in the documentation.
very short:
[autorun]
OPEN=path\cdstart.EXE
ICON=path\logo.ICO
script
[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
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
Thank you a lot