ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

Main Area and Open Discussion > Living Room

Windows Install Date Thingie: I made it!

<< < (11/16) > >>

app103:
My xp machine:



My 9x machine:



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)



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:
Do I get the award for newest install?
Also, this is an image - the actual "install" was only like a week ago...

Ralf Maximus:
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:
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!

Stoic Joker:
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++ ---// UpTime.cpp : Defines the entry point for the console application.#include "stdafx.h" /* define some C99 types for windows */typedef unsigned __int32 uint32_t;typedef unsigned __int64 uint64_t;typedef unsigned __int8 uint8_t;typedef __int64 int64_t; /*static*/ char msgstr[21]; #define KEY_SYSTEM      L"2"#define IDX_UPTIME      674 static void get_boottime(ULARGE_INTEGER *boottime, ULARGE_INTEGER *nowtime) {        BYTE pbuf[4096];        PPERF_DATA_BLOCK ppdb = (PPERF_DATA_BLOCK) pbuf;        DWORD psz = sizeof(pbuf);        PPERF_OBJECT_TYPE ppot;        PPERF_COUNTER_DEFINITION ppcd;        PPERF_COUNTER_BLOCK ppcb;        DWORD i;         memset(pbuf, 0, psz);        nowtime->QuadPart = boottime->QuadPart = 0;     /* 0 = error */         /* get current 64-bit boottime in 100ns units */        RegQueryValueExW(HKEY_PERFORMANCE_DATA, KEY_SYSTEM, NULL, NULL, pbuf, &psz);        RegCloseKey(HKEY_PERFORMANCE_DATA);         if(memcmp(pbuf, L"PERF", 8)) {                /* PERF_DATA_BLOCK signature not present */                return;        }         /* parse returned performance data */        ppot = (PPERF_OBJECT_TYPE) &pbuf[ppdb->HeaderLength];        ppcd = (PPERF_COUNTER_DEFINITION) &pbuf[ppdb->HeaderLength + ppot->HeaderLength];        ppcb = (PPERF_COUNTER_BLOCK) &(((uint8_t *)ppot)[ppot->DefinitionLength]);        nowtime->QuadPart = ppdb->PerfTime100nSec.QuadPart;         /* get uptime and processor queue length */        for (i = 0; i < ppot->NumCounters; i++) {                if (ppcd->CounterNameTitleIndex == IDX_UPTIME) {                        boottime->QuadPart = (int64_t) *(uint64_t *) &(((uint8_t *)ppcb)[ppcd->CounterOffset]);                }                ppcd++;        }} int main() {        ULARGE_INTEGER bt, nt, ut;        uint32_t days;        SYSTEMTIME ust;         get_boottime(&bt, &nt);        ut.QuadPart = nt.QuadPart - bt.QuadPart;        FileTimeToSystemTime((FILETIME *) &ut, &ust);         ut.QuadPart /= 864000000000;         days = (uint32_t) ut.QuadPart;        if(days > 1) {                sprintf(msgstr, "\r\n   %d days, %02d:%02d:%02d\r\n", days, ust.wHour, ust.wMinute, ust.wSecond);        }else if(days == 1) {                sprintf(msgstr, "\r\n   1 day, %02d:%02d:%02d\r\n", ust.wHour, ust.wMinute, ust.wSecond);        }else{                sprintf(msgstr, "\r\n   0 days, %02d:%02d:%02d\r\n", ust.wHour, ust.wMinute, ust.wSecond);        }        printf(msgstr); return 0;}


edit by jgpaiva: added code+spoiler tags

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version