VBS Backup Message Notification

Posted on 2009-07-01
Last Modified: 2013-12-20
I have a Backup script written in VBS that we want to give to one of our employees in Payroll to run whenever he needs it done. In order to monitor it on our end we want it to send a message to our Network Admin either through a command prompt or an email whenever it is run.

I myself am not very familiar with VB, the code we are using is open source and I just changed a few things to fit with our needs.

If anyone has any ideas as to what I should try out I'd greatly appreciate it.
Question by:TechsupportAbility
  • 2

Expert Comment

Comment Utility
Could send an email if you have a mail server on your network that supports it.

Set objMessage = CreateObject("CDO.Message")

objMessage.MimeFormatted = True

objMessage.From = "Mr. Someone <>" 

objMessage.To = "

objMessage.Subject = "subject here"

objMessage.HTMLBody = "body html here"

'==This section provides the configuration information for the remote

'== SMTP server. Normally you will only change the server name or IP.

objMessage.Configuration.Fields.Item _

("") = 2 

'Name or IP of Remote SMTP Server

objMessage.Configuration.Fields.Item _

("") = "mailserver ip"

'Server port (typically 25)

objMessage.Configuration.Fields.Item _

("") = 25 


'==End remote SMTP server configuration section==


Open in new window


Accepted Solution

astroviper earned 500 total points
Comment Utility
I missed a double quote on the end of line 4. Could also use net send if your on xp.

Name = "net send {name | * | /DOMAIN[:name] | /USERS} message"

Set objShell = CreateObject("WScript.Shell")

Return = objShell.Run(Name, 1, true)

Open in new window


Author Closing Comment

Comment Utility
This worked perfectly. Thank you very much for you help!

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Not long ago I saw a question in the VB Script forum that I thought would not take much time. You can read that question (Question ID  ( Here (http…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

772 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

10 Experts available now in Live!

Get 1:1 Help Now