computing
  • 0

Throw Error Msg From a Bat File

  • 0

hello guys,

can n e one tell me how to throw an error msg from a bat file.

e.g

if not %var1% equ %var2% throw myErrorMsg

thanks in advance
roy

Share

1 Answer

  1. One thing on forgot to add is that if the strings are rather generic to windows you may be able to return a number and reference it with “net helpmsg x”.

    Here is a list I just generated on xp home:

    http://judago.webs.com/helpmsg.txt

    Don’t expect the file to stay up long, I only put it there because pastebin is down.

    • 0