+ Reply to Thread
Results 1 to 5 of 5
  1. #1
    Mobile Member ShuckyD's Avatar
    Join Date
    Apr 2005
    Location
    S. Central PA
    Posts
    3,646

    Login script for terminal server

     
    I am trying to get a login script to write to a file of the users that log into a specific server I have setup as a terminal server. That server is running Microsoft Server 2003 and all I want to do is log time spent on the server. This server will be setup for several different users and I want to be able to log time at the end of the week.

    Writing to a file to .csv or just a text file is fine all that I need to do is be able to have it append to a file, or either create a new one for each day with the username time in, out, etc.

    Can anyone point me in the right direction since I dont know where to start on this?
    Mobile: Thinkpad T61 | WinXP Pro | C2D T8300 CPU | 3GB DDR2 | 320GB Hybrid SSD HDD | AGN & WWAN
    Desktop: Dell XPS 8300 | 3.4 Ghz Intel i7 | 8GB DDR3 | 1TB OS, 1.5TB Mirrored DATA

  2. #2
    Not Really a Member
    Join Date
    Oct 2001
    Posts
    27,856
    could do it in several ways
    for me, I'd probably write up some cheesy batch file or vbs script to log to the file and put it in a login script/logout script.
    You could put the script in the local policies of the server

  3. #3
    Mobile Member ShuckyD's Avatar
    Join Date
    Apr 2005
    Location
    S. Central PA
    Posts
    3,646
    Where would I go to do that thoguh? I know where the local policies section is on the server but how would I go about doing a script to log user's (without having to sift through the event log)?
    Mobile: Thinkpad T61 | WinXP Pro | C2D T8300 CPU | 3GB DDR2 | 320GB Hybrid SSD HDD | AGN & WWAN
    Desktop: Dell XPS 8300 | 3.4 Ghz Intel i7 | 8GB DDR3 | 1TB OS, 1.5TB Mirrored DATA

  4. #4
    Not Really a Member
    Join Date
    Oct 2001
    Posts
    27,856
    REALLY cheesy but simple you could just put in a batch file

    echo %USERNAME% %DATE% %TIME% LOGON >> log.txt

    you'll get this in your log.txt file
    vass0922 Thu 03/05/2009 22:10:55.72 LOGON

    Then for the logoff script
    echo %USERNAME% %DATE% %TIME% LOGOFF >> log.txt

    Its a bit manual though, seeing as you'd have two lines.
    If you were good at batch files you could put logon time into %username%.txt file then when it came time to append the real log.txt just take the logon value out of %username%.txt file to put both values on one line.. seeing as you now know logoff time because its now

  5. #5
    Mobile Member ShuckyD's Avatar
    Join Date
    Apr 2005
    Location
    S. Central PA
    Posts
    3,646
    We'll I know there's an area in the local security policy for login and logoff, couldnt I just call a .vbs file or something that would export to my C: Drive if I found one so its not so manual?
    Mobile: Thinkpad T61 | WinXP Pro | C2D T8300 CPU | 3GB DDR2 | 320GB Hybrid SSD HDD | AGN & WWAN
    Desktop: Dell XPS 8300 | 3.4 Ghz Intel i7 | 8GB DDR3 | 1TB OS, 1.5TB Mirrored DATA

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Kornshell Script for automation of Login
    By pareshan in forum Linux and Unix
    Replies: 1
    Last Post: December 1st, 2008, 01:28 PM
  2. Basic Login Account Script
    By J1mmy in forum Webmastering and Programming
    Replies: 1
    Last Post: June 5th, 2007, 06:13 PM
  3. Windows 2003 Server terminal Server Domain Problem
    By sensi in forum Applications and Operating Systems
    Replies: 1
    Last Post: January 21st, 2005, 01:02 PM
  4. Win XP/Netware Login Script
    By ribster in forum Technical Support
    Replies: 0
    Last Post: July 10th, 2003, 06:16 AM
  5. URGENT: W2K Server - Terminal Server issue
    By ReFuRbEd in forum Applications and Operating Systems
    Replies: 1
    Last Post: May 6th, 2002, 02:50 PM

Tags for this Thread

Posting Permissions

  • You may post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Recommended Sites: ResellerRatings Store Reviews