Monday, May 15, 2006

windows install date

useful when u need something unique from the PC and easy to get

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion

installdate value

InstallDate
REG_DWORD
Time (in seconds) since 12:00 A.M, January 1, 1970

here's a VBS script which displays the info:

Dim WshShell, TimeStampSet WshShell = WScript.CreateObject("WScript.Shell")TimeStamp = WshShell.RegRead(_"HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\installdate")WScript.Echo "Install date :" & _DateAdd("s", TimeStamp, DateSerial(1970, 1, 1))

No comments:

Post a Comment