Windows Scripting
  Home arrow Windows Scripting arrow Logon Script to Send Email Notifications
Iron Speed
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  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Dedicated Servers 
Download TestComplete 
Windows Web Hosting
 
IBM® developerWorks 
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 / 3
    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
     
     
    Iron Speed
     
    ADVERTISEMENT

    Ajax Application Generator Generate database and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    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

    - VBScript: Array Functions
    - VBScript: Strings, You Can`t Function withou...
    - VBScript: More String Functions
    - VBScript: Functioning with Strings
    - Working with the Windows Registry in C++
    - Understanding Objects
    - HTML Applications: Giving WSH a User Interfa...
    - Modifying Computer Objects with Active Direc...
    - Logon Script to Send Email Notifications
    - Securing Computers and Active Directory
    - Moving and Renaming Computers with Active Di...
    - Working with System Processes in WSH
    - Active Directory and Computers
    - WCF and Proxies
    - Metadata and WCF Essentials

     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     




    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway