WinBatch® Technical Support Forum

All Things WinBatch => WinBatch => Topic started by: Daniel on October 28, 2014, 05:26:07 AM

Title: Is it possible to change this message?
Post by: Daniel on October 28, 2014, 05:26:07 AM
Hi there,

When Winbatch terminates due to an error condition, it presents the and error screen similar to the attached image.

The legend that indicates the line of the script that the error occurs at includes the full path to the script, including the drive letter.

I compile the scripts and distribute them to the users, or run from the log in script. The drive letter and path only serve to confuse the users, who say things like "it is looking for something on the G: drive and I don't have one". In addition the help desk consultant think the same thing.

Is it possible to somehow dynamically configure this dialog to reference the line number and script file name only, i.e. no full path and drive letter? Maybe something with Intcontrol 73? Or possibly an undocumented Intcontrol?

Many thanks.

Daniel




Many thanks
Title: Re: Is it possible to change this message?
Post by: snowsnowsnow on October 28, 2014, 05:38:21 AM
Two things:

1) I routinely use the following line of code at the top of every script I write:

IntControl(50,0,0,0,0)          ; Turn off Web Page Support

This gets rid of the bit about calling the Help Desk.

2) While you can't really change the rest of the stuff that gets displayed, you can get rid of it altogether by using IntControl(38).  This is "Quiet Mode".  Here's a sample line using IC(38):

IntControl(38,1,"C:\tmp\IntControl38.log",0,0)   ; Quiet mode

In Quiet Mode, no error box will ever be displayed.  Use this only when you're done debugging your script and you want to hide any further mistakes that exist in your code from your usersââ,¬Â¦
Title: Re: Is it possible to change this message?
Post by: JTaylor on October 28, 2014, 05:57:15 AM
Perhaps use IntControl 73 and do your own error handling?

Jim