Windows Scripting
  Home arrow Windows Scripting arrow Logon Script to Send Email Notifications
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Silverlight  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
ASP Web Hosting  
ASP.NET Web Hosting 
Windows Web Hosting
 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WINDOWS SCRIPTING

Logon Script to Send Email Notifications
By: Nilpo
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 4
    2008-01-29

    Table of Contents:
  • Logon Script to Send Email Notifications
  • Gathering logon details
  • Creating and sending the notification email
  • Putting it all together

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Logon Script to Send Email Notifications


    (Page 1 of 4 )

    A member of the ASP Free Forums recently asked if there was any way to receive email notification whenever users logged on across the network. I responded that there was. Today I’m going to show you how to create a network logon script that will send an email notification whenever a user logs on.As I approached this scenario, I immediately saw two ways of accomplishing this task.  I could simply monitor Active Directory for user logon events, but that would require that Active Directory actually be in use.  So, in an effort to make a single solution, I settled upon the second idea.

    The idea was to create a logon script.  Since logon scripts are loaded every time a user logs on, it works even when Active Directory is not in use.  I also wanted this script to have the ability to run as a network logon script or as a standalone script for non-networked workstations.  Thus, I had to rely on common objects without assuming any server capabilities.

    The script’s functionality was simple.  It needed to log information about the logon event, including user name, machine information, and date/time. Then it needed to create and send an email containing that information to a given address.

    Of course, the script should function quietly in the background and require no user interaction.

    With these goals in mind, I set out to create the script.  The first order of business was to get all of the required information to create the email.

    Let’s start there.

    More Windows Scripting Articles
    More By Nilpo


     

    WINDOWS SCRIPTING ARTICLES

    - More Windows Scripting Workarounds from Nilpo
    - Overloading Methods and More in VBScript
    - Improving MFC for Windows Vista
    - Regular Expressions in VBScript
    - Working with Dates in WMI
    - Completing Calendars with VBScript Date Func...
    - Building Calendars with VBScript Date Functi...
    - Working With Dates and Times in VBScript
    - Designing WCF DataContract Classes Using the...
    - Understanding Dates and Times in VBScript
    - Working With Arrays in VBScript
    - Compressed Folders in WSH
    - Using .NET Interops in VBScript
    - Nilpo`s Scripting Secrets, Vol I
    - Database operations using Silverlight 2.0 WC...





    © 2003-2010 by Developer Shed. All rights reserved. DS Cluster 9 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek