Me again...
Working with 100s of Windows 98 and 100s of Windows XP operating systems
I have recently (today) tested using XSET to color my .BATs output.
I Set up the code so I can run one line while doing individual OSs.
So if I am running 98 then %X1% = XSET and when XP %X1% = CALL XSET32
Here is the problem, with Windows 98, XSET works as advertised, when
I run XSET/COLOR RED /PROMPT "SHOW SOME COMMENT" it works great but
with CALL XSET32/COLOR RED /PROMPT "SHOW SOME COMMENT" after showing
the comment, the .BATCH dies. No errors, no warnings nothing only
back to the DOS prompt
I have tried compiled with ExeSCRIPT and Quick File Batch Compiler as
well as standard .BAT running, all give the same problem. I tried
several PCs and they all run the same way, only does the first line
of CALL XSET32 and then dumps to DOS.
I tried a simple .BAT file
*snip*
CALL XSET32/COLOR RED /PROMPT "THIS IS LINE ONE"
CALL XSET32/COLOR WHITE /PROMPT "THIS IS LINE TWO"
CALL XSET32/COLOR CYAN /PROMPT "THIS IS LINE THREE"
*snip*
It only runs line 1 then dumps to DOS.
Any clues would be greatly appreciated
Thanks again
sKurt
*snip*
::+=(01)=================+
::| Find windows Version |
::+======================+
[01]@[EMAIL PROTECTED]
SET j=>tmp$$.bat
::+=(02)===============================+
::| Get Ver, DEL Blanks, Cut out 98/XP |
::+====================================+
[01]@[EMAIL PROTECTED]
| GAWK "/./" | CUT -c 9-10>>tmp$$.bat
[02]@[EMAIL PROTECTED]
tmp$$.bat>NUL
[03]@[EMAIL PROTECTED]
tmp$$.bat>NUL
::+=(03)============================+
::| Compare %j% if it is t then set |
::| the variable to XP ELSE it's 98 |
::+=================================+
[01]@[EMAIL PROTECTED]
"%j%"=="t " SET j=XP
::+=(04)=================+
::| Setup XSET OS Switch |
::+======================+
[01]@[EMAIL PROTECTED]
"%j%"=="XP" TITLE SET XSET OS VER
[02]@[EMAIL PROTECTED]
"%D1%"=="/DEBUG" ECHO SET XSET OS (04)
::+==============================+
::| Finally decided to try XSET |
::| and it works great, in Win98 |
::| CALL XSET32 doesn't seem to |
::| work with Windows XP :( |
::+==============================+
[01]@[EMAIL PROTECTED]
"%j%"=="XP" SET X1=CALL XSET32
[02]@[EMAIL PROTECTED]
"%j%"=="98" SET X1=XSET
::+============================+
::| Put the HELP switch AFTER |
::| the XSET parse for color |
::+============================+
::+=(HELP)=====================+::
@[EMAIL PROTECTED]
%1 | FIND /i "help">NUL
@[EMAIL PROTECTED]
NOT ERRORLEVEL 1 GOTO :_HELP_SCR
::+=(/HELP)====================+::
::+=(05)==============+
::| Count script runs |
::+===================+
[01]@[EMAIL PROTECTED]
"%D1%"=="/DEBUG" %X1%/COLOR RED /PROMPT "COUNTING RUNS (05)"
[02]@[EMAIL PROTECTED]
EXIST RunCount.DAT GOTO :_1
[03]@[EMAIL PROTECTED]
>>RunCount.DAT ECHON 0
[04]:_1
[05]@[EMAIL PROTECTED]
"{printf \"%%s\n\",$0+1}" RunCount.DAT>count$$$.tmp
[06]@[EMAIL PROTECTED]
/Y count$$$.tmp RunCount.DAT>nul
*snip*
--


|