|
-
April 27th, 2009, 12:15 PM
#1
Log Windows username from HTML file into txt file
Hi, I have the following code on and html file, but i cant make it work,
Any Ideas ??? Please help : )
-------------------------------------------
Code:
<script language="vbscript">
function DoOnLoad()
Declare Function GetSystemMetrics Lib "user32.dll" (ByVal nIndex As Long) As Long
On Error GoTo LogFail
Dim filenum As Integer
Dim i As Integer
Dim fic As String
filenum = FreeFile
logfile = "C:\over.log"
Open logfile For Append As filenum
Print #filenum, Date & " " & Time & ";" & Environ("UserName") & ";" & Environ("ComputerName") & ";"
Close filenum
LogFail:
MsgBox "Errors has been detected.", vbExclamation, "Warning"
end function
</script>
<html>
<head>
</head>
<body onload="vbscript:DoOnLoad">
Este archivo deberia logear en c:\over.log
</body>
</html>
Last edited by Frlecube; April 27th, 2009 at 12:24 PM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|