This is how I used to make it in [GuiRunOnce]:
CODE
ECHO.
ECHO Ejecting CD-ROM Drives...
ECHO If you are using a cd rom please remove it from
ECHO the cdrom drive and If you have a second cd place
ECHO it in the drive at this time please.
ECHO.
ECHO Wait till the cdrom drive quits blinking
ECHO and then ...
ECHO start
start cscript %systemdrive%\install\Tools\cd_eject.vbs > null
ECHO After start
pskill cscript.exe > null
ECHO.
PAUSE
IF EXIST %systemdrive%\install\applications.cmd GOTO RUNBATCH
SET CDROM2=
IF EXIST D:\install\applications.cmd SET CDROM2=D:
IF EXIST E:\install\applications.cmd SET CDROM2=E:
IF EXIST F:\install\applications.cmd SET CDROM2=F:
IF EXIST G:\install\applications.cmd SET CDROM2=G:
IF EXIST H:\install\applications.cmd SET CDROM2=H:
IF EXIST I:\install\applications.cmd SET CDROM2=I:
IF EXIST J:\install\applications.cmd SET CDROM2=J:
IF EXIST K:\install\applications.cmd SET CDROM2=K:
IF NOT EXIST %CDROM2%\install\applications.cmd GOTO RUNBATCH
ECHO Please be patient while files are copied to your hard drive.
xcopy %CDROM2%\install %systemdrive%\install\ /S /C /Q /H /Y
ECHO.
ECHO.
ECHO Starting application batch file
start /wait %systemdrive%\install\applications.cmd
ECHO Ejecting CD-ROM Drives...
ECHO If you are using a cd rom please remove it from
ECHO the cdrom drive and If you have a second cd place
ECHO it in the drive at this time please.
ECHO.
ECHO Wait till the cdrom drive quits blinking
ECHO and then ...
ECHO start
start cscript %systemdrive%\install\Tools\cd_eject.vbs > null
ECHO After start
pskill cscript.exe > null
ECHO.
PAUSE
IF EXIST %systemdrive%\install\applications.cmd GOTO RUNBATCH
SET CDROM2=
IF EXIST D:\install\applications.cmd SET CDROM2=D:
IF EXIST E:\install\applications.cmd SET CDROM2=E:
IF EXIST F:\install\applications.cmd SET CDROM2=F:
IF EXIST G:\install\applications.cmd SET CDROM2=G:
IF EXIST H:\install\applications.cmd SET CDROM2=H:
IF EXIST I:\install\applications.cmd SET CDROM2=I:
IF EXIST J:\install\applications.cmd SET CDROM2=J:
IF EXIST K:\install\applications.cmd SET CDROM2=K:
IF NOT EXIST %CDROM2%\install\applications.cmd GOTO RUNBATCH
ECHO Please be patient while files are copied to your hard drive.
xcopy %CDROM2%\install %systemdrive%\install\ /S /C /Q /H /Y
ECHO.
ECHO.
ECHO Starting application batch file
start /wait %systemdrive%\install\applications.cmd
(yes I took it from this website a while ago).
Now, this work great in a batch file, but I don't think I can use it for RunOnceEx. Any clue someone?
Tks