Pottsey (20th January 2009)
Pottsey (20th January 2009)
Hrrm even more confused now, the script is working. It’s bringing up an error message but the folder is full of text log files.
EDIT: removed the $ from all four paths and its working perfectly. Thanks Tosh
Last edited by Pottsey; 20th January 2009 at 10:18 AM.
I log to a mysql database, i find it to be a neat solution... then it's redisplayed via iis to a admin screen.
that way i can search and connect via vnc with 1 click when a user requires assistance
Error: Permission Denied
Source: Microsoft VBScript rutime error
The script still runs and logs though.
got it working!
Started using this properly on January 23rd.
Made some edits to the VBS scripts for a simple line input into the text files.
Set up the shares on our second DC and then watched the logging start
Only additional thing I've done is set up a batch script which archives the log files into a daily folder at 23:59 each night (scheduled task) and then clears out the active folders.
This will eliminate the need to ever do a tidy up or clear out.
Only thing I have noticed is some machines aren't logging... most likely because they're just wanting a rebuild back on to CC3.
garethedmondson (23rd March 2009)
As you say it's also easier to build web based reports if you're looking at a SQL database. We have one-click access into the user's web logs for that day I think I can build a link in to our CCTV system too, but I've never had the time...
Just a quick one...
I stumbled accross this post and tested to see if it worked.
All I can say is WOW - thanks! Works like a dream (took 5 mins to set up and start logging!)
Here it is...
Make sure you change the physical server archive location in the script appropriately - Drive:\Folder[...]\ArchiveCode:@echo off title SPCTracker Archive Script echo. echo This batch script is archiving the days logfiles from SPCTracker. echo. echo. echo Access Physical Server Archive Location echo. D: cd \ cd SPCTracker cd Archive echo. echo Begin Archive Structuring for Day echo. md "%date:/=-%" cd "%date:/=-%" md "Users" md "Computers" echo. echo Back up to SPCTracker Root echo. cd .. cd .. echo. echo Start Copying Users Logfiles echo. cd Users move *.* "../Archive/%date:/=-%/Users/" cd .. echo. echo Start Copying Computers Logfiles echo. cd Computers move *.* "../Archive/%date:/=-%/Computers/" cd .. echo. echo Process Complete! echo. exit
You'll need to manually create the Archive folder within the root of your Record Logons folder otherwise it'll all get very messy.
I find at the end of each month it's best to grab all of the months folders and then archive them manually into folders like:
bugginmiami (23rd April 2009)
The scripts posted by tosh74 and Neoplosive were almost exactly what I needed! thanks!
Quick question, has anyone added another field thats logged for the IP address?
I know its beyond me unfourtuantely!
we use these lines in our login script
Code:rem LOG USER AND IP====================================================================================== @for /f "tokens=2* delims=:. " %%a in ('ipconfig ^| find /i "ip address"') do Echo %date%,%time%,%username%,'%computername%,%%b >>k:\ICTtech\TechlogIP.txt rem =====================================================================================================
There are currently 1 users browsing this thread. (0 members and 1 guests)