write log file as system during logon? 
Author Message
 write log file as system during logon?

Can anyone tell me if there is a way to write a log file from the vbs
logon script (in XP) as System (or someother level) so that the user
can't have read access to the folder/file that is being written to?

Thanks in advance.
--Gene



Sat, 20 Aug 2005 23:13:21 GMT  
 write log file as system during logon?
Gene,

You may want to do something like this.
Placing this code in a logon batch file will open IE and send the username and computername
as a query string to a web server.

You can then log this data to a database on the web server.
I do this to get service pack versions and registry settings pushed up also.

Set objIE = WScript.CreateObject("InternetExplorer.Application","objIE_")
objIE.Visible = False
StrUserName = GetUserName()
StrComputerName = WshNetwork.ComputerName
objIE.Navigate "http://servername/log.asp?COMPUTER=" & mStrComputerName & "&USER=" & mStrUserName
Set objIE = Nothing

Function GetUserName()
 GetUserName = ""
 mIntCounter = 0
 Do While GetUserName = "" AND mIntCounter < 5000
  mIntCounter = mIntCounter + 1
  GetUserName = WshNetwork.UserName
 Loop
End Function

-------------------------------------------------
d l b j r

Unambit yourself from meager knowledge of others,
engender uncharted sagacity.
-------------------------------------------------



Sun, 21 Aug 2005 05:12:27 GMT  
 write log file as system during logon?
I haven't tested it out, but I can set files/folders to write access and not
read access with the security tab.  But I don't know if you that would work-
being able to write to something but not be able to read it.

How about making the folder hidden?


Quote:
> Can anyone tell me if there is a way to write a log file from the vbs
> logon script (in XP) as System (or someother level) so that the user
> can't have read access to the folder/file that is being written to?

> Thanks in advance.
> --Gene



Mon, 22 Aug 2005 04:53:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. write log file as system during logon?

2. Write in the application log or system log

3. Write in Application Log or System Log on NT

4. Making an Event Log Message File in VB (NOT WRITING TO THE EVENT LOG)

5. Cancelling file writing process during long writes

6. Writing information to System Application log

7. overlapping during Read file and write file

8. VBA - Write To File - Simple Log File!

9. Logging to system event logs...

10. Help: Event Logging to System log

11. Write ADO Field containing binary data (files) to the file system

12. Event Log: Writing to the NT Event Log

 

 
Powered by phpBB® Forum Software