I have gone through all the articles and still cannot get this to work consistently using v4.60.

To Test:
I logon
I map a drive manually (persistent) to the wrong share
I run USE $Letter /delete /persistent
I run USE $Letter \\Server\Share

When I run it this way the drive does get deleted but it does not get re-mapped to the new share.

When I run it via the logon script it does not appear to anything at all. The share does not change. If I run NET USE instead it works fine except users see the CMD.EXE Run from UNC error. I don't mind utilizing NET USE if I can hide the error. I have not had any success with that either.

I hope I am just doing something silly. Is there a working UDF I could use instead?

Below is what I am currently using in the logon script:
 Code:
Function MapDrive($DriveLetter, $UNC, optional $persistent)
	dim $subcmd, $pt, $d, $di, $shell, $per
	? "Connecting " + $DriveLetter + " to " + $UNC
	$Ltr = Split($DriveLetter, ":")
	If exist($DriveLetter + '\')
;		shell "%ComSpec% /c net use " + $DriveLetter + " /delete /y> NUL 2>&1"
		USE $DriveLetter /delete /persistent
	EndIf
	If $persistent
		  use $DriveLetter $UNC /persistent
	Else
		  use $DriveLetter $UNC
	EndIf
	If not exist($DriveLetter + '\')
		$strDrvMapLog = "\\Server\logs$\DrvMapFailure\" + @WKSTA + ".TXT"
		WriteLog($strPrnMapLog, @DATE + "," + @TIME + "," + @WKSTA + "," + @UserID + "," + $DriveLetter + "," + $grplist)
		CLS
		" "
		? "COULD NOT MAP DRIVE "  + $DriveLetter + " to " $UNC + @CRLF
		? "Please contact the ServiceDesk at (XXX)XXX-XXXX for assistance." + @CRLF
		? "Press any key to continue..." get$
		exit 1
		return
	Endif
ENDFUNCTION