I am receiving the message "An error has occurred in script." "The network path was not found." Then the script points to the below code.
'DomainString = WshShell.ExpandEnvironmentStrings("%USERDOMAIN%")
Set UserObj = GetObject("WinNT://schwans/" & strUserID)
strFullName = UserObj.FullName
intFirstName = InStr(strFullName, " ")
strFirstName = Left(strFullName,intFirstName - 1)
strLastName = Right(strFullName, Len(strFullName) - intFirstName)
'WScript.echo "First name: " & strFirstName
'WScript.echo "Last name: " & strLastName
The code works successfully on a regular setup PC, but I get the network path cannot be found when I use the same application on a terminal service machine. Any help would be greatly appreciated.
'DomainString = WshShell.ExpandEnvironmentStrings("%USERDOMAIN%")
Set UserObj = GetObject("WinNT://schwans/" & strUserID)
strFullName = UserObj.FullName
intFirstName = InStr(strFullName, " ")
strFirstName = Left(strFullName,intFirstName - 1)
strLastName = Right(strFullName, Len(strFullName) - intFirstName)
'WScript.echo "First name: " & strFirstName
'WScript.echo "Last name: " & strLastName
The code works successfully on a regular setup PC, but I get the network path cannot be found when I use the same application on a terminal service machine. Any help would be greatly appreciated.