/* ------------------------------------------------------------------- *
 *    This program is to restart CDRWSel at CDRWSel invocation         *
 * ------------------------------------------------------------------- *
 * Remy DODIN : V1.0 from 04/01/2004   - Ok with CDRWSel 2.13.2 or up  *
 * ------------------------------------------------------------------- */      
/* [Load of Rexx functions] */
 
Call RxFuncAdd 'SysLoadFuncs', 'RexxUtil', 'SysLoadFuncs'
Call SysLoadFuncs
Parse Upper Source sys calltype filespec'.'ext
Parse Upper arg CDRWSEL_pgm .
Lp=LastPos('\',filespec);path_pgm=substr(filespec,1,Lp-1)
Drive=substr(path_pgm,1,2)
''Drive
'CD 'path_pgm

If CDRWSEL_pgm="" then CDRWSEL_pgm="CDRWSel.exe -i -s"
   Else CDRWSEL_pgm=CDRWSEL_pgm'.EXE'

/* [Wait CDRWSel completion and restart it] */
Call SysSleep 7/10
'start 'CDRWSEL_pgm
Exit
