Command-line system information

  • Thread starter Thread starter noon
  • Start date Start date
N

noon

I'm aware of the systeminfo tool. Basically what I am after though is
detailed network information. Upstream/downstream information for any
NIC as well as uptime information (though this can be found from
systeminfo). I know there were particular IRC scripts that tapped
into DLLs in order to find the sort of information I am looking for.

Anyone have some hints?
 
'##########################uptime code example#############
Dim strComputer, objWMIService, PerformanceOS, Perf, uptime, dny, hodiny,
minuty, vteriny
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set PerformanceOS = objWMIService.ExecQuery _
("Select * from Win32_PerfFormattedData_PerfOS_System")

For Each Perf in PerformanceOS
uptime = Perf.SystemUpTime
Next
dny = uptime\86400 'zpetne lomitko zaokrouhluje na cele cisla smerem dolu
hodiny = (uptime\3600)Mod 24
minuty = (uptime\60)Mod 60
vteriny = uptime Mod 60
uptimer = "Uptime:" & dny & " days " & hodiny & " hours " & minuty & "
minutes " & vteriny & " seconds"

wscript.echo uptimer
'##########################uptime code example#############
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top