polps Posted December 17, 2008 Share Posted December 17, 2008 Hello all, how to get the time elapsed since the computer is powered on? Thanks Link to comment Share on other sites More sharing options...
99ojo Posted December 17, 2008 Share Posted December 17, 2008 Hello all, how to get the time elapsed since the computer is powered on? Thanks Hi, try this: $strComputer = "." $objWMIService = ObjGet ("winmgmts:\\" & $strComputer & "\root\cimv2") $colitem = $objWMIService.ExecQuery ("Select * From Win32_PerfFormattedData_PerfOS_System"); Where Default = True") For $objos in $colitem $systemuptime = Int ($objos.systemuptime / 60) MsgBox (0, "", $systemuptime & " minutes") Next Link to comment Share on other sites More sharing options...
polps Posted December 17, 2008 Author Share Posted December 17, 2008 Yes, it works perfectly! Thanks! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now