I'd like to suggest a few changes I did myself, but sure you can incorporate them in a more convenient fashion
MAKEISO=0/1
to skip image creation
BURNISO=0/1
to skip image burning
DELETETEMP=0/1
to delete all temporary files at the end of cd creation
by now, if I'm not wrong they're deleted at the beginning of the process
also an option to EMBED XPCREATELOG into distribution disk, to have a trace of what kind of cd one is using.
this is how I implemented them in the xpcreated.cmd I used these days rem
Quote
IF "%MAKEISO%"=="1" (
CALL :MAKEISO
IF "%BURNISO%"=="1" (
CALL :BURNISO
)
)
CALL :CLEANUP
rem mod by cyberchicken
IF not "%DELETETEMP%"=="0" (
rem CALL :DELETETEMP
)
Quote
IF EXIST XPCT*.* DEL XPCT*.* /Q >> XPCREATE.LOG
IF EXIST SVCPACK.LOG DEL SVCPACK.LOG >> XPCREATE.LOG
IF EXIST *.INF XCOPY *.INF NEWFILES\ >> XPCREATE.LOG
IF EXIST *.INF DEL *.INF /Q >> XPCREATE.LOG
IF EXIST *.SIF XCOPY *.SIF NEWFILES\ >> XPCREATE.LOG
IF EXIST *.SIF DEL *.SIF /Q >> XPCREATE.LOG
rem mod by cyberchicken
IF EXIST TEMP RMDIR TEMP /S /Q
CALL :SHOWLOG "Started at: %STARTTIME%"
CALL :SHOWLOG "Finished at: %TIME:~0,8%"
rem mod by cyberchicken
IF EXIST XPCREATE.LOG copy XPCREATE.LOG CDROOT\ > NUL
IF EXIST XPCREATE.LOG MOVE XPCREATE.LOG NEWFILES\ > NUL
in the cleanup subroutine
For example many objects (xpcreatelog for example!) are non parametrized (hold in a variable), some subroutines are not used and a lot of code is repeated instead than reutilized.
I'm not new to batch, I worked tons of code in 4dos/4nt, but I admit that cmd capabilities (which I don't know deeply) are much limiting in doing what I point out.
I myself tried to convert :DELETEALL subroutine to a looped one and failed, probably to the much hated commadn line limit.
Nontheless I think that an "easier", less scaring, XPCreate.cmd would help bringing more scriptkiddies to the dark side of the programming
Thank you
Cyberchicken (who's typed english might have many bugs 'cause he's tired)



Help
Back to top








