Hoy dia necesite por razones X saber la fecha de instalacion de mi Windows XP en mi computador, recorde el comando systeminfo, el cual te da la Informacion del Sistema y entre esos datos esta la fecha de instalacion original del windows.
Esto no va con el titulo del post, pero como en el momento no recordaba el nombre del comando, pues yo tenia un script vbs para ver la fecha de instalacion del windows que lo baje hace tiempo de internet asi que lo comparto :
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set objOS = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
For Each strOS in objOS
dtmInstallDate = strOS.InstallDate
strReturn = WMIDateStringToDate(dtmInstallDate)
Wscript.Echo "Windows se instaló en esta computadora el" _
& Chr(13) & Chr(13) & " " & strReturn & Chr(13) & Chr(13) _
& "Formato: Dia/Mes/Año Horas:Minutos:Segundos"
Next
Function WMIDateStringToDate(dtmInstallDate)
WMIDateStringToDate = CDate(Mid(dtmInstallDate, 5, 2) & "/" & _
Mid(dtmInstallDate, 7, 2) & "/" & Left(dtmInstallDate, 4) _
& " " & Mid (dtmInstallDate, 9, 2) & ":" & _
Mid(dtmInstallDate, 11, 2) & ":" & Mid(dtmInstallDate, _
13, 2))
End Function
Enlaces de Interes :
http://technet.microsoft.com/en-us/library/bb491007.aspx
Bytes!
0 comentarios:
Publicar un comentario