Jump to content

Registry DWord Date


Recommended Posts

This reads the date serial number [i'm guessing] that Windows [XP or Vista] was installed

;Windows Install Date

;

$readreg = RegRead("HKLM\SOFTWARE\MICROSOFT\WINDOWS NT\CURRENTVERSION\", "InstallDate")

MsgBox(0,"Installation Date", $readreg)

Exit

It produces the following number "1196279887"

How do you convert that to dd:mm:yy hh:mm:ss format?

Ant..

Edited by anixon
Link to comment
Share on other sites

Hello Anixon :)

Haven't seen you in a while.

Here is the explanation of that number you get:

http://www.ilopia.com/Private/installDate.aspx

Now that you have the explanation - I will leave the challenge to make a time converter to you :)

SNMP_UDF ... for SNMPv1 and v2c so far, GetBulk and a new example script

wannabe "Unbeatable" Tic-Tac-Toe

Paper-Scissor-Rock ... try to beat it anyway :)

Link to comment
Share on other sites

Hello Anixon :)

Haven't seen you in a while.

Here is the explanation of that number you get:

http://www.ilopia.com/Private/installDate.aspx

Now that you have the explanation - I will leave the challenge to make a time converter to you :)

Hello enaiman :)

Been working on Skype and Cordless phone related issues..

This is how I solved my issue...

;Windows Install Date

;

$readreg = RegRead("HKLM\SOFTWARE\MICROSOFT\WINDOWS NT\CURRENTVERSION\", "InstallDate")

$sNewDate = _DateAdd( 's',$readreg, "1970/01/01 00:00:00")

MsgBox( 4096, "", "Date: " & $sNewDate )

Exit

In Excel its a little different:

Excels date serial number 1 is 1900/01/01 where Windows install dates are recorded in seconds starting at 1970/01/01 so if you are using Excel to get the correct date then you have to add the days serial number for 1970/01/01 (25569) to the days serial number for the install date. =Round( InstallDate / (60*60*24),0) + 25569

Thanks for the clue...

Edited by anixon
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...