Handling output for multiple error messages

2 posts · Closed

Omar Guest
6 Aug 2019

I am using a remote VB script (essentially the same as your logged on user script built into the software). In the column view, how do I enter the Regular Expression so that I can have it replace multiple values?

For example, when I run the scan, it gives me one of the following:

  • Name of the user
  • No one is logged onto the computer, the search filter cannot be recognized
  • The remote server machine does not exist or is unavailable

I want to replace anything that is not the name of the user with just "none" or something else. I am not very familiar with using RegEx. What is the easiest way to do this?

Ann SoftPerfect
6 Aug 2019

It would not be easy to use a regular expression here since there are many possible error messages.

What you could do instead as add the following line at the beginning of your script:

On Error Resume Next

This will silently absorb all execution errors. You may still need to handle some errors in the code, depending on what exactly the script is doing.

Alternatively, you could set up a display filter via View - Setup Filter and hide the lines that contain error messages.

This topic is closed. It has had no new posts for over a year, so the software versions it talks about may be out of date. Start a new topic in Network Scanner if you have a similar question.