topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Thursday March 28, 2024, 10:15 am
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Last post Author Topic: Windows Install Date Thingie: I made it!  (Read 97126 times)

app103

  • That scary taskbar girl
  • Global Moderator
  • Joined in 2006
  • *****
  • Posts: 5,884
    • View Profile
    • Donate to Member
Re: Windows Install Date Thingie: I made it!
« Reply #50 on: November 06, 2007, 07:11 PM »
My xp machine:

SNAG-0166.png

My 9x machine:

installdate9x.png

I guess it isn't 9x compatable.  :(

The real original install date is some time back in September 2002 with a repair install done over original on 10/1/2004 which changed the date. (a botched IE 6 update I couldn't roll back screwed up Explorer, needed to revert to original IE 5.5 to repair)

osinfo.png

No drive images involved in obtaining those dates on either machine...all natural.

Ralf:

If you would like to make your little app 9x compatable, on a 9x system I believe the reg key would be:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\FirstInstallDateTime

dlagesse1992

  • Supporting Member
  • Joined in 2006
  • **
  • default avatar
  • Posts: 24
  • someonestolemyname
    • View Profile
    • Donate to Member
Re: Windows Install Date Thingie: I made it!
« Reply #51 on: November 28, 2007, 03:06 PM »
Do I get the award for newest install?
Also, this is an image - the actual "install" was only like a week ago...

Ralf Maximus

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 927
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Windows Install Date Thingie: I made it!
« Reply #52 on: November 29, 2007, 01:08 AM »
OOooh, I forgot about this wee beastie.  It's been, after all, more than 24 hours. :-)

I need to break it open again and see where I went wrong with the date conversion.

Mandork

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 64
  • Hopeless or hapless?
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Windows Install Date Thingie: I made it!
« Reply #53 on: January 05, 2008, 06:57 AM »
Just ran across this and thought I'd give it a try.  The horror!  It's been running the same installation ever since it was purchased.  I don't have any disk imaging strategies or anything...one of the many projects that have been put aside while I try to finish my PhD.

Incidentally, all you multiple-install folks, do any of you have any experience with re-activating MS Office?  I am using a technically borrowed computer (belongs to my Dad) which has Office 2003 Pro, acquired through his company for a discount.  I'm not certain if the license is part of their group license, or if it is Dad's own personal one.  Dad doesn't know, either.  Is there any way to find out from the computer itself?  And if I try to reformat and reinstall, can I re-activate Office using a burned copy of the Office CD (Dad has the original on the other side of the Atlantic) and the key information as reported by Belarc advisor, or is there another piece of info that I need?

That's the one thing that has been stopping me from trying any reformat or repair operations.  It's running fine, albeit slowly, and I am afraid to try anything lest I screw up Office.  I'm also familiar with the alternatives (OOo, etc.) and I'm actually using LaTeX to produce the final output, but I have yet to find anything that rivals Word's outline view. 

Unless anyone has a suggestion for the latter....?   ;)

Apologies if this is in the wrong place!
Computers are useless. They can only give you answers.
Pablo Picasso

Stoic Joker

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 6,646
    • View Profile
    • Donate to Member
Re: Windows Install Date Thingie: I made it!
« Reply #54 on: January 05, 2008, 07:22 AM »
Not sure if this is OK, but here is the code for a commandline uptime utility I was playing with awhile back.

Crap... I can't find the code tags so this will look terrible...Sorry!

code inside
Code: C++ [Select]
  1. // UpTime.cpp : Defines the entry point for the console application.
  2. #include "stdafx.h"
  3.  
  4. /* define some C99 types for windows */
  5. typedef unsigned __int32 uint32_t;
  6. typedef unsigned __int64 uint64_t;
  7. typedef unsigned __int8 uint8_t;
  8. typedef __int64 int64_t;
  9.  
  10. /*static*/ char msgstr[21];
  11.  
  12. #define KEY_SYSTEM      L"2"
  13. #define IDX_UPTIME      674
  14.  
  15. static void get_boottime(ULARGE_INTEGER *boottime, ULARGE_INTEGER *nowtime) {
  16.         BYTE pbuf[4096];
  17.         PPERF_DATA_BLOCK ppdb = (PPERF_DATA_BLOCK) pbuf;
  18.         DWORD psz = sizeof(pbuf);
  19.         PPERF_OBJECT_TYPE ppot;
  20.         PPERF_COUNTER_DEFINITION ppcd;
  21.         PPERF_COUNTER_BLOCK ppcb;
  22.         DWORD i;
  23.  
  24.         memset(pbuf, 0, psz);
  25.         nowtime->QuadPart = boottime->QuadPart = 0;     /* 0 = error */
  26.  
  27.         /* get current 64-bit boottime in 100ns units */
  28.         RegQueryValueExW(HKEY_PERFORMANCE_DATA, KEY_SYSTEM, NULL, NULL, pbuf, &psz);
  29.         RegCloseKey(HKEY_PERFORMANCE_DATA);
  30.  
  31.         if(memcmp(pbuf, L"PERF", 8)) {
  32.                 /* PERF_DATA_BLOCK signature not present */
  33.                 return;
  34.         }
  35.  
  36.         /* parse returned performance data */
  37.         ppot = (PPERF_OBJECT_TYPE) &pbuf[ppdb->HeaderLength];
  38.         ppcd = (PPERF_COUNTER_DEFINITION) &pbuf[ppdb->HeaderLength + ppot->HeaderLength];
  39.         ppcb = (PPERF_COUNTER_BLOCK) &(((uint8_t *)ppot)[ppot->DefinitionLength]);
  40.         nowtime->QuadPart = ppdb->PerfTime100nSec.QuadPart;
  41.  
  42.         /* get uptime and processor queue length */
  43.         for (i = 0; i < ppot->NumCounters; i++) {
  44.                 if (ppcd->CounterNameTitleIndex == IDX_UPTIME) {
  45.                         boottime->QuadPart = (int64_t) *(uint64_t *) &(((uint8_t *)ppcb)[ppcd->CounterOffset]);
  46.                 }
  47.                 ppcd++;
  48.         }
  49. }
  50.  
  51. int main() {
  52.         ULARGE_INTEGER bt, nt, ut;
  53.         uint32_t days;
  54.         SYSTEMTIME ust;
  55.  
  56.         get_boottime(&bt, &nt);
  57.         ut.QuadPart = nt.QuadPart - bt.QuadPart;
  58.         FileTimeToSystemTime((FILETIME *) &ut, &ust);
  59.  
  60.         ut.QuadPart /= 864000000000;
  61.  
  62.         days = (uint32_t) ut.QuadPart;
  63.         if(days > 1) {
  64.                 sprintf(msgstr, "\r\n   %d days, %02d:%02d:%02d\r\n", days, ust.wHour, ust.wMinute, ust.wSecond);
  65.         }else if(days == 1) {
  66.                 sprintf(msgstr, "\r\n   1 day, %02d:%02d:%02d\r\n", ust.wHour, ust.wMinute, ust.wSecond);
  67.         }else{
  68.                 sprintf(msgstr, "\r\n   0 days, %02d:%02d:%02d\r\n", ust.wHour, ust.wMinute, ust.wSecond);
  69.         }
  70.         printf(msgstr);
  71.  return 0;
  72. }



edit by jgpaiva: added code+spoiler tags
« Last Edit: January 05, 2008, 07:36 AM by jgpaiva »

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,153
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Windows Install Date Thingie: I made it!
« Reply #55 on: January 05, 2008, 07:25 AM »
Stoic: use [code]<stuff here>[/code] tags... or use the "reply" button instead of quick reply, and use the code formatting highlighting thingy.
- carpe noctem
« Last Edit: January 05, 2008, 10:53 AM by f0dder »

Stoic Joker

  • Honorary Member
  • Joined in 2008
  • **
  • Posts: 6,646
    • View Profile
    • Donate to Member
Re: Windows Install Date Thingie: I made it!
« Reply #56 on: January 05, 2008, 10:10 PM »
Stoic: use [code]<stuff here>[/code] tags... or use the "reply" button instead of quick reply, and use the code formatting highlighting thingy.

Oh Yeah, That... (Duh!) I tend to be a bit retarded first thing in the morning.

Thank You.

Digerati

  • Participant
  • Joined in 2008
  • *
  • Posts: 3
    • View Profile
    • Donate to Member
Re: Windows Install Date Thingie: I made it!
« Reply #57 on: April 16, 2008, 10:57 AM »
Hi folks, new to here, but not IT. And a HW guy - don't do code - so I don't have much to contribute, but questions and observations.

I joined to comment on this program - I like it, first off and it works great on my XPPSP2 system. Thanks for providing it, Ralf.

But I have my dad's old XPHomeSP2, XP2500+ I built in November 2002 sitting in the dungeon of my basement crunching BOINC units, and it refuses to die - or even stumble. Note the discrepancies between Microsoft's Uptime (which is correct, BTW -  :D) and Windows Install Date "thingie" below:


http://i195.photobucket.com/albums/z181/Digerati_Bill/One-Time%20Upload/uptime-wrong.png
Windows Install Date Thingie: I made it!


The Install date for that system is correct. However, last I checked, November 2002 plus 6 years 5 months equals May 2009 - I don't think we are there yet.

Also, it will be interesting to see what happens in ~33.6 hours (note the -2014 minutes) - I wonder how it knows I will reboot then? ;)

I look forward to V1.2.

Edit note - updated link to image - Digerati
« Last Edit: August 13, 2008, 07:42 AM by Digerati »

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: Windows Install Date Thingie: I made it!
« Reply #58 on: April 16, 2008, 11:03 AM »
welcome aboard, Digerati! :) just to let you know that Ralf is on a little break right now and we hope to see him back very soon.

tomos

  • Charter Member
  • Joined in 2006
  • ***
  • Posts: 11,959
    • View Profile
    • Donate to Member
Re: Windows Install Date Thingie: I made it!
« Reply #59 on: April 16, 2008, 01:12 PM »
hi Digerati* & welcome :)
-
from a page or two back

Yikes!  Something indeed is weird.

The first number (Install Date) comes straight out of the registry; I'm just reading the number and displaying it.  Reasons that number might be wrong for you (just guessing):

- Machine came from a vendor who pre-installed Windows years ago, then imaged it.  They build new PCs by installing the image.

- Some other app twiddled the registry setting in question for some mysterious and unknowable-by-man reason.

- Registry got "fixed" at one time in the past by restoring a backup from a registry cleaning tool, and the backup was from an old version.

The second number (alive time) comes from the WMI (Windows Management Instrumentation) "last reboot" date.  Again, that's the number handed over by Windows when that value is requested.  A logical person might assume Windows is actually resetting that value upon startup, but I'm not certain of anything anymore...

I'll do some research on when WMI resets that value and see what I can learn.  Anyone with more WMI knowledge/experience than I please feel free to chime in.

* btw, do you happen to hang out/help at the castlecops forums?
just tried to go there for a look now but thing's moving incredibly slowly there at the mo
Tom

Digerati

  • Participant
  • Joined in 2008
  • *
  • Posts: 3
    • View Profile
    • Donate to Member
Re: Windows Install Date Thingie: I made it!
« Reply #60 on: April 18, 2008, 06:40 AM »
Thanks lanox and tomos.
* btw, do you happen to hang out/help at the castlecops forums?
just tried to go there for a look now but thing's moving incredibly slowly there at the mo
Yes, that's me - well, Bill_Bright is me. And yes CastleCops is running slow (still/again - in fact, they appear to be down again this morning - :().

As for the alive times being off - what can I say? If Uptime knows when I last rebooted, then it seems the alive times should be right. I just wonder how many folks have encountered a Windows PC that has been running for more than 3 months without a reboot. ;)

ThArGos

  • Participant
  • Joined in 2008
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Re: Windows Install Date Thingie: I made it!
« Reply #61 on: November 04, 2008, 04:47 AM »
Hello. Congratulations on your client.

I would like to share with you our uptime project.
We have uptime clients for many architectures (windows, mac, linux) and each client sends its uptime to our server.
Thus we can display the uptime of everyone playing the game.

You can reach us at http://www.uptimeprj.com/

Everybody is welcome, you can even help, or create your own client. Yes your own client ! So you can adapt your actual client to participate to this great adventure =)

See you soon !
--
ThArGos
« Last Edit: November 04, 2008, 09:23 AM by ThArGos »

y0himba

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 448
  • Yar.
    • View Profile
    • y0himba.net
    • Read more about this member.
    • Donate to Member
Re: Windows Install Date Thingie: I made it!
« Reply #62 on: November 04, 2008, 06:32 AM »
It's Vista :P


Davidtheo

  • Participant
  • Joined in 2008
  • *
  • Posts: 119
    • View Profile
    • Donate to Member
Re: Windows Install Date Thingie: I made it!
« Reply #63 on: November 04, 2008, 07:26 PM »
My work Computer.


date.JPG

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: Windows Install Date Thingie: I made it!
« Reply #64 on: November 04, 2008, 07:59 PM »
has anyone been in touch with Ralf? haven't seen him for a while, still seems to be on his long sabbatical.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,896
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: Windows Install Date Thingie: I made it!
« Reply #65 on: November 05, 2008, 12:58 AM »
Great question!

We need to start a petition to get Ralf back!!

COME BACK RALF WE MISS YOU!!

ThArGos

  • Participant
  • Joined in 2008
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Re: Windows Install Date Thingie: I made it!
« Reply #66 on: November 05, 2008, 04:20 AM »
Have a look at our rankings : http://www.uptimeprj.com/toplist.php?lang=en

It would be great if Ralf adapts his program to participate to our uptime project.
What do you think of ?

mcvrkovic

  • Participant
  • Joined in 2008
  • *
  • default avatar
  • Posts: 1
    • View Profile
    • Donate to Member
Re: Windows Install Date Thingie: I made it!
« Reply #67 on: December 05, 2008, 11:35 AM »
29.12.2002. !!!

I use Northon ghost to refres the system...

Yeah!

:)


Ralf Maximus

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 927
    • View Profile
    • Read more about this member.
    • Donate to Member
Re: Windows Install Date Thingie: I made it!
« Reply #68 on: December 05, 2008, 12:15 PM »
Holy smokes!

I'd kinda forgotten this thread existed.  Thanks, mcvrkovic, for the ping.  :)

ThArGos: I'll check out the link and see what's involved in adapting it.  Also, I'll back-scan thru the thread and collect a list of bugs that need fixin'.

Then, I'll dust off the code and we shall see.

ThArGos

  • Participant
  • Joined in 2008
  • *
  • default avatar
  • Posts: 3
    • View Profile
    • Donate to Member
Re: Windows Install Date Thingie: I made it!
« Reply #69 on: December 08, 2008, 10:09 AM »
Great !

Our website has just been totally redone. At the moment subscriptions are suspended (for the week I think) in order to verify that the new website is working well.

You can check out the new display of the rankings here http://www.uptimeprj...t/index/en/0-30/UZD/

Cheers!
--
ThArGos

fritz57

  • Participant
  • Joined in 2009
  • *
  • default avatar
  • Posts: 1
    • View Profile
    • Donate to Member
Re: Windows Install Date Thingie: I made it!
« Reply #70 on: February 11, 2009, 07:11 AM »
Hi,
    the exe [ v.1.1 ] is cool but it seem to me there is a two minor errorrs: i.e.
a) The time elapsed from installation date is wrong [ one year too much ] 
b) the  tick of the up time from reboot seem too fast respect the system clock on the tray bar i.e. when by the tray bar system clock the elapsed time is 5h 33 min the Install Date progs state a 6h 37 min elapsed [ quite strage :! ]

Anyway thanks for your code

federico


   P.S.  here the image to show problem a) 

@thehop

  • Participant
  • Joined in 2005
  • *
  • Posts: 19
    • View Profile
    • Donate to Member
Re: Windows Install Date Thingie: I made it!
« Reply #71 on: July 15, 2009, 09:29 PM »
thx - fine Tool !  :)

But it differs two hours (Summertime?) from the WHS onboard tool netsh.exe (Network Command Shell)
[Startbutton] -> Run... -> netsh diag gui

Network Diagnostics
Network Diagnostics scans your system to gather information about your hardware, software, and network connections.

-> Scan your system
-> Set scanning options

... bla-bla ...

 InstallDate = 09:44:34 11.07.2009
 LargeSystemCache = 0
 LastBootUpTime = 15:03:33 15.07.2009
 LocalDateTime = 04:00:45 16.07.2009
 Locale = 0c07
 Manufacturer = Microsoft Corporation
 MaxNumberOfProcesses = -1
 MaxProcessMemorySize = 2097024
 Name = Microsoft Windows Server 2003 for Small Business Server|C:\whs|\Device\Harddisk0\Partition2
 NumberOfLicensedUsers = 10



cheerio

Markoul

  • Participant
  • Joined in 2009
  • *
  • Posts: 1
    • View Profile
    • Donate to Member
Record Breaker
« Reply #72 on: August 27, 2009, 08:14 AM »
snap280.jpg

Yes but back in 2005 i have migrated my 2001 windows xp installation i had in my old nforce1 motherboard to my current (since 2005) nForce4 Machine using a backup Norton ghost image. This Methuselah installation dated back to 2001! ...  :o

It even survived and i did not reinstall windows XP, when in October 2006 i changed from my single core cpu to a dual core. This was be done with the help of a friend expert changing the installation Hall file. You can read in more detail here.  

I do not know how to prove my sayings to you? i am open to ideas ... The Windows Install Date Thingie reports the original Installation Windows XP date only for the specific current Motherboard.

The only thing i came up was to run a file search dated before 2004... and i came up with this results, see for your self:

snap281.jpg


Best Regards,

Markoul  :Thmbsup:
 
« Last Edit: August 27, 2009, 08:18 AM by Markoul »

Digerati

  • Participant
  • Joined in 2008
  • *
  • Posts: 3
    • View Profile
    • Donate to Member
Re: Windows Install Date Thingie: I made it!
« Reply #73 on: March 15, 2011, 09:57 AM »
Sorry to dredge this up from the deep but I sure would not mind seeing a Windows Install Date Thingy "gadget" for Windows 7!  :D

kyrathaba

  • N.A.N.Y. Organizer
  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 3,200
    • View Profile
    • Donate to Member
Re: Windows Install Date Thingie: I made it!
« Reply #74 on: March 15, 2011, 01:22 PM »
winInstallDate.png

How does the program calculate time since reboot?  The elapsed time shown may be correct for my laptop if we're talking about user-initiated reboot; but Windows OS automatically rebooted my machine sometime in the past two days, after updates were downloaded and installed...
« Last Edit: March 15, 2011, 01:24 PM by kyrathaba »