3 Replies Latest reply on May 22, 2020 1:44 PM by DrewHeath

    Change install date after virtual machine clone.

    wilson94t Hot Shot

      My Windows OS guys would like to find a way to update the install date on windows after a VM has been cloned.   This would be in the situation where sysprep is not run (and for argument sake, lets assume that it will not be run in this example).

       

      Anyone have a, preferably command line script or tool that will output the number of seconds since Jan 1, 1970 on windows so I can slam it into :

       

      \[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion]

      "SoftwareType"="SYSTEM"

      "InstallDate"=dword:

       

      IIRC, at least at one time the way microsoft was generating the time since epoch was not taking leapseconds into account and so the time was off by a few hours... that would even be ok for me.  I don't need it to be exact.

       

      There are tons of canned scripts for this on other platforms, but i haven't seen one on windows yet.  Anyone have something to share?