Hi Experts,
Am new to scripting and am looking for help.
I have a script that logs information of user when he logs on.
This is the script :
$LogPath="serversharefolderUserLOG"$LogFile="$LogPath@USERID.LOG"$RETURN=CHR(13)+CHR(10)
$LogError=OPEN(5,$LogFile,5)
$LogText="@USERID - @DAY @MDAYNO. @MONTH @YEAR - @TIME" GOSUB WRL$LogText="" GOSUB WRL$LogText="Name : @FULLNAME" GOSUB WRL$LogText="comments : @COMMENT" GOSUB WRL$LogText="Accesstype : @PRIV" GOSUB WRL$LogText="Computername : @WKSTA" GOSUB WRL$LogText="DNS Host : @HOSTNAME" GOSUB WRL$LogText="IP-address : @IPADDRESS0" GOSUB WRL$LogText="MAC-Address : @ADDRESS" GOSUB WRL$LogText="Domain : @DOMAIN" GOSUB WRL$LogText="Logon Domain : @LDOMAIN" GOSUB WRL$LogText="Logon Server : @LSERVER" GOSUB WRL
; Loginscript...
IF $LogError=0 $LogText="" GOSUB WRL $RES=CLOSE(5)ENDIFEXIT
; Skriv til logfil...
:WRLIF $LogError=0$RES=WRITELINE(5,$LogText+$RETURN)ENDIFRETURN
Result:
.log file is created with user name
xxxxx - Wednesday 25. March 2009 - 09:42:38
Name : xxxxx, xxxxxcomments : xxxxx
Accesstype : ADMINComputername : xxxxxxxxDNS Host : xxxxxxxIP-address : xxxxxxxx
MAC-Address : 0x0xx14xDomain : xxxxxxxLogon Domain : xxxxxxLogon Server : xxxx
Script works great.
Here is what am looking for.
1# It should write to a csv file with logged on user.
2# It should put the data in colums
3# Need to grab asset information and write to the next colum.
Any help is appreciated.
Regards,
Need help with this Kix script
Forum rules
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Need help with this Kix script
You'll also be limited to whatever the user has permissions to access.