Need help with this Kix script

Batch, ASP, JScript, Kixtart, etc.
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.
This topic is 15 years and 1 week old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
dasridhar
Posts: 2
Last visit: Wed Apr 08, 2009 3:28 am

Need help with this Kix script

Post by dasridhar »

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,









User avatar
dasridhar
Posts: 2
Last visit: Wed Apr 08, 2009 3:28 am

Need help with this Kix script

Post by dasridhar »

Nope..am trying to learn
User avatar
jhicks
Posts: 1789
Last visit: Mon Oct 19, 2015 9:21 am

Need help with this Kix script

Post by jhicks »

You'll also be limited to whatever the user has permissions to access.
This topic is 15 years and 1 week old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked