:).. I am just kidding as well

I did notice that there is a bug in my script. When it edits the user logged in from its raw data.. its a solid calcuation of stip off the prefix info. For example Domain\username. It is set to strip of the exact numbers of my domain name. I don't think everyone has the same numberes, so i wanted to mention that the username won't come back correctly if it isn't properly substringed.

here is the peice of code that will change this.

 Code:
Function GetloginName($_Chkcomputers)

; == Declaring Variables
Dim $_Usrloggedin	; User Logged into current system in current format Domain\Username
Dim $_Username		; Just username by itself

	$_Usrloggedin = fnWMILoggedin (1,$_Chkcomputers)			; == Current user logged in. Remove ' ' around $_Chkcomputers may be needed
	$_Usrname = substr ($_Usrloggedin,6)	   ; ************ Edit the 6 To whater your Domain\ is.	 

shorten

If len(ltrim($_Usrloggedin)) = 0	; == Checks for a 0 digit value assigned to user, if it did (User not logged) in is Returned.
	$_Unli = "(User Not Logged In)"
	$Getloginname = $_Unli
	Return
Endif

$Getloginname = $_Usrname

EndFunction