Supressing VBScript Message Box Error Messages

Posted on 2007-10-03
Last Modified: 2009-12-16

I'm running a VBScript that connects to an outside contractors SFTP server to download some files.  Thee script basically is:

If Connection is successful then
download files
If Not

The script generally works but if the server is actually "down", a message box comes up.  The problem is that we are automating this script via a Scheduled Task and the job "hangs" when this message comes up.

Is there a simple way to supress any/all message boxes that come up?  Like an "on error false" or something?
Question by:clebo99
    LVL 18

    Assisted Solution

    try this:

    on error resume next
    LVL 65

    Accepted Solution

    This also depends on whether it's a message from the FTP program, or from VBScript.  If it's a VBScript error, the On Error Resume Next should work, but if you want to know about the error, you should make the VBS log the actions to a file as well.

    If you paste the code we can have a look at can obviously change any sensitive data....



    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Hello again, all.  For those of you that have been following along, you'll know that this is my third article on this topic (though it is not Part III).  This article is sort of remedial, and probably the topic with which I should have started the s…
    Well hello again!  Glad to see you've made it this far without giving up.  In this, the fourth installment of my popular series, I'm going to cover functions and subroutines, what they are, and why they are useful.  Just in case you stumbled onto th…
    how to add IIS SMTP to handle application/Scanner relays into office 365.
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now