Actually, these lines can be omitted altogether...

code:
$objNetwork = WScript.CreateObject("WScript.Network")
$UserName = $objNetwork.UserName
$CompName = $objNetwork.Computername

$UserName can be replaced with @USERID and $CompName can be replaced with @WKSTA in the remaining lines of code.