Customize shutdown event tracker at user log on, make user state or type a reason

Posted on 2009-04-21
Last Modified: 2012-05-06
Hi Experts!

I have allready made a question in the Windows 2003 server forum but they thought that I should try here instead.

What I want to do is to have something that appears at log in that forces the user to state or type a reason for logging on to the server. My thought was to customize shutdown event tracker that also loggs in the event viewer but the available tools that I konw of doesnt let me customize it the way I want to like the tool cutreasonedit.exe.

Does anybody in here have any idea how to maybe script this?

Thanks Jim  
Question by:jimloa
    1 Comment
    LVL 22

    Accepted Solution

    Here's a basic template for how to do this with VBScript.  To add more bells and whistles (like mandatory entry), you would have to use a more sophisticated language such as one of the .net flavors.
    option Explicit
    Dim eventText
    Dim objShell
    eventText = inputBox("Enter reason for logging into this server: ", "Login Reason")
    Set objShell = Wscript.CreateObject("Wscript.Shell")
    objShell.LogEvent 0, eventText

    Open in new window


    Featured Post

    Enabling OSINT in Activity Based Intelligence

    Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

    Join & Write a Comment

    Suggested Solutions

    Learn about cloud computing and its benefits for small business owners.
    If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
    Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
    Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

    746 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

    18 Experts available now in Live!

    Get 1:1 Help Now