Here you have a nice solution, works fine!
Function Main()
Set WshNetwork = WScript.CreateObject("WScript.Network")
MsgBox("Domain = " & WshNetwork.UserDomain)
MsgBox("Computer Name = " & WshNetworkComputerName)
Main = DTSTaskExecResult_Success
End Function
/Henrik