Need workaround for Win32_OperatingSystem.LastBootUpTime returning Null on Win9x

D

David Holcomb

I am trying to calculate the system uptime on Win9x, but
Win32_OperatingSystem.LastBootUpTime always returns Null.

I am considering, as a workaround, using the CIM_DataFile.LastModified time
for the %windir%\system.ini file. It seems, with my little bit of testing,
that this file gets updated, or re-written, every time the OS reboots. I
don't know yet if it is likely that it would ever get modified without a
reboot (though it is clearly possible since anyone can edit it).

So I wonder if there are any other known workarounds for retrieving a valid
LastBootUpTime on Win9x, or is there some other reliable way to calculate
the system uptime from a script?

Thanks,
David Holcomb
 

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

Top