We help IT Professionals succeed at work.

How to change windows installasion date


Is there any way/script to change the date when windows is installed??
Watch Question

Robert RComputer Service Technician

Why would you want to do that?, You can't really change the install date, as the install date is the date when you actually installed the operating system. The only way you can change the date is to reinstall the operating system. You can change your date and clock settings in the bios then reinstall the operating system using those settings. I doubt if you can change it in any other way.

The installed date is stored in the registry at:  HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion
InstallDate is a DWORD key that stores the date in binary format.
The value is stored in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\InstallDate

It is the number of seconds from January 1, 1970 00:00:00

To change it save the script as a .vbs
Open it with notepad and change the date to what you want it to be
Save it and close it.
Run the .vbs file and it will give you the number of seconds to enter.

Go to the registry key and open it.
Click the decimal radio button
Enter the new number and Click OK

InstallDate = "06/10/2010 00:00:00"
InstallSeconds = CLng(DateDiff("s", "01/01/1970 00:00:00", InstallDate))
WScript.Echo InstallDate

Open in new window

Hi quist,

I hope we should need to Echo Install Seconds on order to get the required date in seconds as the value needs to be entered in the registry key (HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\InstallDate) would be in seconds.

I Hope the below script should work.

InstallDate = "06/10/2010 00:00:00"
InstallSeconds = CLng(DateDiff("s", "01/01/1970 00:00:00", InstallDate))
WScript.Echo InstallSeconds

Pls Suggest.....

Yes this is correct.  Sorry for the typo.
Why did  ou accepted your comment to my solution instead of my solution?

Following an objection by rlandquist, at least one Moderator has reviewed this question and has decided that the question was not closed properly. Code supplied by the Expert was used in the final solution (with a minor typographical error fixed) and as such points should have been awarded for that solution.

As such, I'm re-opening this question and accepting the Author's final comment, along with an assist with full points for the comment by rlandquist.

The originally accepted comment was http:#a33059716

EE Moderator