Quotes look a bit off. Try this...

Quote:

$SHRServer1="Server1"
$SHRServer2="Server1"

;********** Connect Common and Private shared
:SHARED

;Disconnect Previous Connections
USE N: /DELETE
USE M: /DELETE

;Connect Common Drive
USE N: "\\"+$SHRServer1+"\common"
;Connect personnal Drive
USE M: "\\"+$SHRServer2+"\"+$UserID+"$$"




I also didnt see you specifying the $UserID anywhere. Are you sure you arent getting this confused with @UserID?