Pasted below is the script to read a list of users out of the SAM using the ADSI interface and dump them into a file, so you could customise that. you'd need to customise it so that Domain is set to the workstation name, but get that from the data file.
Copy and paste this into Notepad to reformat.
Const ForReading = 1, ForWriting = 2, ForAppending = 8
DomainName = "MYDOMAIN"
Set WSHNetwork = WScript.CreateObject("WScript.Network")
Set Shell = WScript.CreateObject("WScript.Shell")
Set fso = CreateObject("Scripting.FileSystemObject")
RunFolder = "\\server\folder"
Set Domain = GetObject("WinNT://" & DomainName)
For each Object in Domain
if Object.Class = "User" then
ret = WriteOutput(RunFolder & "USERNAMES.txt", Object.name & " " & Object.FullName & " " & Object.Description)
end if
Next
msgbox "Done"
'********************************************************************
'* General Purpose Result File Output *
'********************************************************************
function WriteOutput (File, Data)
dim f, rtn
set f = fso.openTextFile(File, forAppending, true)
rtn = f.writeline (Data)
f.close
end function