This should work.

Change “\\computername\filename.log” to your wishes. The output file is plain text so you can read it using notepad for example, the ,0 option appends the data to the existing file if set to 1 it overwrites the existing data.

I use this to log who logged on to a specific workstation because I had some stupid users said that nobody knew there password but somebody did logon to a workstation using there account.

To use a specific filename for each computer you can also use the @WKSTA for the filename. This way you will get a logfile for each machine, might be handy for busting some users [Big Grin] (if they have install rights). Adding the time and date into the logfile has been usefull to me too. The ? "-------------" line is added to keep things readable.

code:
; Read Hotfixes Registry Key
$Index = 0
:Loop1
$KeyName = ENUMKEY("HKEY_CURRENT_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\HotFix\ ", $Index)
If @ERROR = 0
;
REDIRECTOUTPUT ("\\computername\filename", 0)
;
? "Name found: $KeyName"
;
? "-------------------------"
;
$Index = $Index + 1
goto Loop1
Endif

_________________________
Mart

- Chuck Norris once sold ebay to ebay on ebay.