Hi All,
i want my virus scanner to run an exe after completeing some tasks, it has the capacity to do this.
what i want is a program that will pick up the user name and mail a simple message, 'done', to my mail account. i am struggeling to find out how to do this, can anyone suggest a program, a language or batch file line to acheve this. i am not a programer, but not inexperianced eather. any lines of code would be helpfull

cheers

spikes

Recommended Answers

All 12 Replies

I've never done anything like this via windows before. My guess, however, is that you would need some form of mail or SMTP server (perhaps the one built-into IIS?) What VirusScan program are you using?

using NAI enterprise virus scanner 7.0, it will allow you to enter the name of a program that you wish to run after a successfull update, i just want to know which of my users have updated and which havent.

spikes

I'm writing the program now... :-)

Okay, I'm done. The program can be downloaded here: http://tekmaven.dizla.com/emailer.zip

The only thing it requires the .NET Framework v1.1 (free download at Microsoft.com).

The ZIP file has 3 files in it: Emailer.exe, EmailerSettings.exe, and settings.config. To use emailer, extract it anywhere on your hard drive, and run EmailerSettings.exe. The Settings app will read the config file, and show you the settings. Adjust the settings for your needs. Below is an image of the settings app:

[img]http://tekmaven.dizla.com/EmailerSettings.JPG[/img]

Next, set the virus scanner to execute Emailer.exe. When the virus scan finishes, emailer.exe will read the settings, send the email, and exit. It looks like this while sending the email:

[img]http://tekmaven.dizla.com/emailer.JPG[/img]

I hope this is what you wanted :-).

Also, if Mr Gates (the TTF User) sees this, I will be releasing the VB.NET Source Code later today.

When ya get a chance, reply and tell me if this is what you needed.

I just want some satisfaction 8) .

Hi there,
Thank you so much for your help on this, but unfortuneatlywhen it ran it genarated the following:

application has generated an exception that could not be handled

process id = 0x754 (1876), thread id =0x74c (1868)

any ideas?

this was run on a win2k machine with the .NET framework in place

cheers

spikes

Is it the .NET Framework 1.1? It has just recently came out, try doing a windows update, it will appear in the reccomended updates.

Hi,
I've installed the exe for .NET 1.1 that you gave me the link for and unfortuneatly the exception is still there.

Is there anything i can do to help solve this?, or is there another way of codeing the program.

cheers

spikes

I have updated the original zip file with a new emailer.exe file that will tell you the error when it occurs. It can be downloaded here: http://tekmaven.dizla.com/emailer.zip

The problem that you are having is most likely to do with your SMTP Server. Either it doesn't exist, or it can't be properly connected.

What STMP server address are you using?

Hi,
Sorry it was just me being an idiot, it was the smtp address that i had enterd wrong. the mailer works a treat. thankyou for you hard work.

also, what software do you need to write programs useing the .NET framework, is it just the sdk from microsoft, and if so is it hard to learn the language?

again many thanks

spikes

Well, you don't need any software, just a text editor and the SDK to compile apps, but this is often very unrealistic. In actuality, you need a development enviornment, Visual Studio .NET 2003, which runs for about $500-$5000, depending on the version you want.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.