Set WshShell=WScript.CreateObject("WScript.Shell")
Set WshNetwork=WScript.CreateObject("WScript.Network")
Set fs = CreateObject("Scripting.FileSystemObject")
strUser = WshNetwork.UserName
' Open output file
strfilename = WshShell.ExpandEnvironmentStrings("%temp%") & "\\myinfo.txt"
If fs.FileExists(strfilename) Then
fs.DeleteFile strfilename, TRUE
End If
Set t = fs.CreateTextFile(strfilename, True)
t.WriteLine(" ")
t.WriteLine("==== Non-MS Network Adapters ============ ")
Set tempSet = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery("select DeviceID,Description,Manufacturer,MACAddress from Win32_NetworkAdapter")
For each DeviceID in tempset
If DeviceID.Manufacturer <> "Microsoft" then
strTempLine = DeviceID.Description & " MAC: " & DeviceID.MACAddress
t.WriteLine(strTempLine)
End If
Next
t.Close
