Loading
Scriptbox
 VBScript Links 
 About VBscript 
 JavaScript Links 
 About JavaScript 
 Powershell Links 
 PSCRIPT the Script Launcher 
 PowerShell Shortcut Keys 
 About Powershell 
     VBScript
    JavaScript
    Powershell
Disclaimer
Contact
Latest 10 Scripts
Script search
  :: { Category } :: 0-9ABCDEFGHIJKLMNOPQRSTUVWXYZ
         

Search Options:  Retrieve  the  Windows  Installation  date  

 Content of Retrieve the Windows Installation date.vbs
MD5 Hash: 408FBD60660600FD5C4D8E38EC242F4A
'----- (c) Boris Toll 2007 -----


Const HKEY_LOCAL_MACHINE = &H80000002

strComputer = "."

Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\Microsoft\Windows NT\CurrentVersion"
strValueName = "InstallDate"


Call oReg.GetDWORDValue(HKEY_LOCAL_MACHINE, strKeyPath, strValueName, strValue)
MsgBox UnixTStampTo_Date(strValue)


'------------------------------------------ TimeStamp to Date
Function UnixTStampTo_Date(strValue)

On Error Resume Next

vStart = DateSerial(1970, 1, 1)
UnixTStampTo_Date = DateAdd("s", strValue, vStart)
Date_Array = Split(UnixTStampTo_Date, " ", -1, vbTextCompare)
UnixTStampTo_Date = WeekdayName(Weekday(UnixTStampTo_Date, vbUseSystemDayOfWeek), False, vbUseSystemDayOfWeek) & ", " & Date_Array(0) & ", " & Date_Array(1)

End Function

   © 2008 - 2013 Boris Toll      :: Scripts available: 6.481 ::      :: scriptbox.toll.at ::      :: powered by www.toll.at ::
  Google Entries:n/a
  Yahoo Backlinks:n/a
  Live Backlinks:n/a
  del.icio.us Bookmarks:n/a
  Technorati Links:n/a