http://linitx.com/product_info.php?c...d06e09774e9e5e
Looks cool.
Ben
Anyone know how to get a VBScript to connect to a SQL Server (2000 or 2005) ?
Looking for one to run during login & Logoff that will connect and be able to write info to a table on the sql server
Working on a logon/Logoff tracker that has a .NET interface (which is running - sort of)
http://linitx.com/product_info.php?c...d06e09774e9e5e
Looks cool.
Ben
We use this in a script to record username, computername and IP to a SQL database - call it with appropriate parameters :-)
The logoff does the same sort of thing but updates the last record for that user/computer pair - I can find the code if you need it :-)
sub RecordLogon(sUsername,sComputername,sIP)
dim sServer, sConn, oConn,oRS
sServer="sqlservername"
sConn="provider=sqloledb;data source=" & sServer & ";initial catalog=logoninfo"
Set oConn = CreateObject("ADODB.Connection")
oConn.Open sConn, "username", "secretpassword"
Set oRS =CreateObject("ADODB.Recordset")
sSQL="insert into logonoff(username,compname,ip,ontime) values('" & sUserName & "','" & sComputerName & "','" & sIP & "',getdate())"
ors.open sSQL, oconn
end sub
Cheers Steve - wil give that a bash on Wednesday![]()
Just found this script very useful!
We're currently looking into ditching ranger and I'm looking for scripts that will replace some of the useful functions of ranger, such as finding out where a specific user has been logged on, which this script does perfectly for me! Now all I've got to do it write a simple PHP interface to allow me to search and report on the data!
I'm also looking for a script or another way of getting a live report on my screen of who is logged on and where at that moment in time. At the moment lan ranger does this of course, but is there another way of doing this without lan ranger??
Cheers,
Mike.
I use an a VBScript (in an HTA) which uses WMI, and Active Directory for all the computer names (which it pings to see if they're on).
It's quite useful, as I definitely know who's on what machine when. I can also then log them off remotely
There are currently 1 users browsing this thread. (0 members and 1 guests)