[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1345
  • Last Modified:

Supressing VBScript Message Box Error Messages

Ok,

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

Connect
If Connection is successful then
download files
If Not
Stop
End

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?
0
clebo99
Asked:
clebo99
2 Solutions
 
David RobitailleAnalyst ProgrammerCommented:
try this:

on error resume next
0
 
RobSampsonCommented:
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 it....you can obviously change any sensitive data....

Regards,

Rob.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now