python - Check the installation date of Windows XP -
is possible check, using python programming languque, time on operating system installed ? mainly, interested in windows xp platform. wonder if there such api in python or trick it.
using windows registry:
import _winreg reg datetime import datetime key = reg.openkey(reg.hkey_local_machine, r'software\microsoft\windows nt\currentversion') secs = reg.queryvalueex(key, 'installdate')[0] # stored unix timestamp date = datetime.fromtimestamp(secs)
Comments
Post a Comment