PC Review Forums Newsgroups Windows XP Windows XP WMI Need workaround for Win32_OperatingSystem.LastBootUpTime returning Null on Win9x

Reply

Need workaround for Win32_OperatingSystem.LastBootUpTime returning Null on Win9x

 
Thread Tools Rate Thread
Old 05-08-2004, 09:53 PM   #1
David Holcomb
Guest
 
Posts: n/a
Default Need workaround for Win32_OperatingSystem.LastBootUpTime returning Null on Win9x


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


  Reply With Quote
Reply



Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off