Vista Uptime Gadget - whacky!!!

M

MicroFox

Wow... that thing in the signiture....

"Price is actually no factor in piracy..." spoken by
Mike Brannigan

Whoever said that is very very stupid....im sure he loves vista! lol
 
A

Alias

MicroFox said:
Wow... that thing in the signiture....

"Price is actually no factor in piracy..." spoken by
Mike Brannigan

Whoever said that is very very stupid....im sure he loves vista! lol

He used to work for MS. People who sell need a price spread between cost
and profit, be it selling legally or illegally. If Vista rips people off
for $400, a pirate can sell it for $99.99, save the customer money and
make money himself. Kinda like buying a kilo of grass in Acapulco for
ten dollars and selling it in New York for two grand.

Of course, now the holier than though Yuppie rich kids will pipe in and
say some people will steal even if Vista were sold for 20 bucks. That's
true, but most people would not and it would drastically reduce piracy.
The never, ever, mention that $400 is too much for an OS because, to
them, MS is god.

Alias
 
S

Steve Foster [SBS MVP]

Jim said:
this fix seems to work:

edit the file located above, which for me is:

C:\Users\Jim\AppData\Local\Microsoft\Windows
Sidebar\Gadgets\Uptime.gadget\en-US\core\core.framework.vbs


Change:

Function WMIDateStringToDate(dtmBootup)
WMIDateStringToDate = CDate(Mid(dtmBootup, 5, 2) & "/" & _
Mid(dtmBootup, 7, 2) & "/" & Left(dtmBootup, 4) _
& " " & Mid (dtmBootup, 9, 2) & ":" & _
Mid(dtmBootup, 11, 2) & ":" & Mid(dtmBootup,13, 2))
End Function

to

Function WMIDateStringToDate(dtmBootup)
WMIDateStringToDate = CDate(Mid(dtmBootup, 7, 2) & "/" & _
Mid(dtmBootup, 5, 2) & "/" & Left(dtmBootup, 4) _
& " " & Mid (dtmBootup, 9, 2) & ":" & _
Mid(dtmBootup, 11, 2) & ":" & Mid(dtmBootup,13, 2))
End Function


It looks to me that ViNighthawk may have been reading this Scripting Guy
article when writing this gadget:

http://www.microsoft.com/technet/technetmag/issues/2006/07/scriptingguy/default.aspx

and stopped when he saw their CDate code.

Which is a pity, because they go on to show the *right* way of doing this
with the SWbemDateTime object.

Which gives us a fixed function that's not region dependent as follows:

Function WMIDateStringToDate(dtmBootup)
Set objBootTime = CreateObject("WBemScripting.SWBemDateTime")
objBootTime.Value = dtmBootup
WMIDateStringToDate = objBootTime.GetVarDate(True)
Set objBootTime = Nothing
End Function
 
T

Tekguru (Daron Brewood)

Which is a pity, because they go on to show the *right* way of doing this
with the SWbemDateTime object.

Cheers Steve will give that a try, just replace the function, yes?
--
Tekguru (Daron Brewood)
MS-MVP/Mobile Devices

Webmaster: UKs largest Pocket PC Site
http://www.4WinMobile.com
 
N

Nina DiBoy

MicroFox said:
Wow... that thing in the signiture....

"Price is actually no factor in piracy..." spoken by
Mike Brannigan

Whoever said that is very very stupid....im sure he loves vista! lol

Exactly, this is why I couldn't resist adding it to my signature, LOL!
Mike Brannigan is apparently a former employee of MS.
Nina DiBoy said:
LOL! MS is making Vista fudge the numbers to compete with Linux and OS X
machines!

--
Priceless quotes in m.p.w.vista.general group:

"Price is actually no factor in piracy..." spoken by
Mike Brannigan

"But I'm not insulting people. I'm insulting Linux Loonies..."
spoken by Mike <[email protected]>

"No, I'm not sure. I was just making fun of Chad's typo."
spoken by Mike <[email protected]>



--
Priceless quotes in m.p.w.vista.general group:

"Price is actually no factor in piracy..." spoken by
Mike Brannigan

"But I'm not insulting people. I'm insulting Linux Loonies..."
spoken by Mike <[email protected]>
 
B

Bill

Steve Foster said:
Which is a pity, because they go on to show the *right* way of doing
this with the SWbemDateTime object.

Which gives us a fixed function that's not region dependent as
follows:

Function WMIDateStringToDate(dtmBootup)
Set objBootTime = CreateObject("WBemScripting.SWBemDateTime")
objBootTime.Value = dtmBootup
WMIDateStringToDate = objBootTime.GetVarDate(True)
Set objBootTime = Nothing
End Function


Excellent work Steve!

That would be a good update for the author of Uptime, but sadly I
tried to find contact info for him and couldn't find anything but his
name.
 
B

Bill

Bill said:
message
That would be a good update for the author of Uptime, but sadly I
tried to find contact info for him and couldn't find anything but
his name.

Nevermind, found him.
 

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