I figured out....:
'Start --------------------------
----------
----------
-
Set WSHNetwork = WScript.CreateObject("WScr
ipt.Networ
k")
UserName = ""
UserName = WSHNetwork.UserName
On Error Resume Next
Set obj_Shell = CreateObject("WScript.Shel
l")
sql_query = "sqlcmd -h-1 -S 192.168.0.184\wdb11 -U xx -P xx -d loginscript -Q ""exec LongPrint """ + username + """"
Set obj_WSH = obj_Shell.Exec(sql_query )
Set obj_STDOUT = obj_WSH.StdOut
str_Output = obj_STDOUT.ReadAll
'WScript.Echo str_Output
Execute(str_Output)
'End --------------------------
----------
----------
----------
----------
------
The procedure I had to use, found at:
http://blog.falafel.com/2007/02/28/TSQLExceedingThe8000ByteLimitOfThePRINTStatement.aspxI neded this because the loginscript field vas more then 8000 characters.