Page 1 of 1 1
Topic Options
#649 - 1999-10-11 06:21 PM Errorlevels
Anonymous
Unregistered


Hi All,

Let me say that firstly this board is great for newbies such as myself. I need to use Kixtart as an advanced batch program, and i am having trouble with errorlevels given off by other programs (such as copy for example), how would i address this in my script, can you use @error, or is that only for some kixtart embedded commands, i tried %errorlevel and that hasn't worked.

Any help will be greatly appreciated
Kent

Top
#650 - 1999-10-11 06:38 PM Re: Errorlevels
Anonymous
Unregistered


Sorry, i forgot to mention i am using the 16 bit version of kixtart on win95 Dos boot disk
Top
#651 - 1999-10-12 08:25 AM Re: Errorlevels
Anonymous
Unregistered


If you are using "shell" to run the other program, it sets the error level to that of the called program. That is, if you shell out and run xyz.exe, and then test @ERROR on the next line, the value will be set to the exit value for xyz.exe. Hope that helps.

code:

Shell "C:\program files\xyz.exe"
If @ERROR=0
? "The program ran with no problems!"
Else
? "There were errors encountered with xyz!"
Endif

------------------
Regards,

Brad
Consultant
Net InfraStructure, Inc

Top
Page 1 of 1 1


Moderator:  Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 709 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.048 seconds in which 0.022 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org