I think we can probably cut the code down a little bit as you are retrieving the information for the currently logged in user...
 Code:
$oADInfo=CreateObject("ADSystemInfo")
$oUser=GetObject("LDAP://"+$oADInfo.UserName)
"Scriptpath='"+$oUser.scriptPath+"'"+@CRLF