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. Logging to system event logs...

3. Write URLs to a log file?

4. writing a log file problem

5. Legal Notice During Logon

6. Creating a log file, then writing folder list to it

7. ASP writing to HTML log file...

8. Running a Visual Basic Script During Logon

9. Application Update during Logon Script?

10. ASP writing to HTML log file...

11. Disable Startmenu during logon.

12. Write URLs to a Log file

 

 
Powered by phpBB® Forum Software