ComputerInformation VBS, MsgBox to saved Text File...
I modified and example of a VB script to pull the computer name and the MAC address, but it outputs to a MsgBox and I want it to output to a text file...I am not very good at changing output methods within VB scripting, any thoughts?
Here is the coding I have:
Set WshNetwork = WScript.CreateObject("WScript.Network")
sComputer = "Computer Name: " & WshNetwork.ComputerName
wmiQuery = "Select * from Win32_NetworkAdapterConfiguration " & "Where IPEnabled = 'True'"
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set colItems = objWMIService.ExecQuery(wmiQuery)
For Each objItem In colItems
For Each IPAddr In objItem.IPAddress
If IPAddr <> "0.0.0.0" Then
sMacAddress = "MAC Address: " & objItem.MACAddress
MsgBox sComputer & vbLf & vbLf & sMacAddress