Archive: Running NSIS EXE on CD


Running NSIS EXE on CD
I'm trying to run an EXE file created with NSIS on a CD with a couple custom pages. I wrote an autorun .inf file to start the EXE when I put the CD in and the first two messages I get are cannot open file to write to for the custom page .inf files. It makes sense that it can't write to a CD and I get the same messages if I manually start the EXE off the CD. Is there a way to get around this?


You're meant to extract the INI files to $PLUGINSDIR

-Stu


How exactly do I do that. I'm very new to NSIS or install scripts in general.


If you're using Modern UI, just use the MUI_INSTALLOPTIONS_ macros.
Otherwise, use File.

-Stu


Like this:

Function .oninit
;For MUI users:
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "yourpagefile.ini"

;For normal users:
File /oname=$PLUGINSDIR\yourpagefile.ini "yourpagefile.ini"
FunctionEnd

Alright, I got it.

Thanks to all!