I have this little bit of code which I extracted from VBA. I need to convert it to a script. The VBA function 'WGetComputer' is not available in VBScript. What this code does is it simply returns the name of the current computer.
Dim lngLength
Dim lngActual
Dim strComputer
lngLength = 16
strComputer = String(lngLength, 0)
lngActual = WGetComputer(strComputer, lngLength)
GetComputerName = Nz(Left(strComputer, lngLength), "Unknown")
MsgBox GetComputerName
Thanks for all your help,
Erik
Dim lngLength
Dim lngActual
Dim strComputer
lngLength = 16
strComputer = String(lngLength, 0)
lngActual = WGetComputer(strComputer, lngLength)
GetComputerName = Nz(Left(strComputer, lngLength), "Unknown")
MsgBox GetComputerName
Thanks for all your help,
Erik