Batch file or utility to change PC date to current from Nov 2008?

Permabanned
Joined
28 Nov 2003
Posts
10,695
Location
Shropshire
I have a well loved automotive database that will only run with the PC date set back to November 2006. I have written a simple batch file to put on my desktop to do this automatically. How can I do something similar to return it to its current date? I imagine it needs some sort of process running? I am a total novice, please keep any advice basic and simple, many thanks.
 
It's an obsolete parts database (Microcat Live) that wants updating. Once obsolete it fails to run and wants a newer one loading, The newer ones don't show parts for the vehicles I am interested in, so I have yo keep using the obsolete one. The batch file to turn the PC clock *back* is simply:

Date 01/11/2008


I need an easy way to set it back to the current date from the desktop, I thought of time servers using the W32TM or whatever it is command, but I don't think it updates a date, just the time?
 
w32tm /resync will work for date and time, provided the time service is running and you have a (reachable) NTP server defined in your Date/Time settings, but for your purposes you might need to edit the registry to change the "Max[Pos/Neg]PhaseCorrection" values, depending on the OS you're running: http://support.microsoft.com/kb/884776.

It might be simpler to run the database in a VM, where you can just keep resetting the guest OS using your original batch file, without worrying about the host time. :)

edit: I've just had a look in the Win7 registry, and the default value for both MaxPos and MaxNeg PhaseCorrection is 54000 (decimal), which is just 15 hours. If you change the values to, say, 300000000 (decimal), that'll give you nearly ten years.

edit2: if you enter a value of 0xFFFFFFFF (hexadecimal), this apparently means "always make time correction", so I guess that would be the one to use. :)
 
Last edited:
It might be simpler to run the database in a VM, where you can just keep resetting the guest OS using your original batch file, without worrying about the host time. :)

That was my first thought too. That would be the thing to do if at all possible.

Failing that, the method above seems pretty clever! Only issue would be that you'd have to remember that any files saved whilst the time was wrong would have the wrong time stamp, so doing stuff like overwriting files if the file being copied was 'newer' might not work properly.
 
There are loads of tools and utils on the landrover forums for making hookie copies of microcat work - take a look on them and youll find everything you need!!
 
You could use one of the many ntp client programs to set your clock back to the current time. I use the free "AboutTime" from arachnoid.com to keep my clock synced. In your case, just run the program once to set the time back to current.
 
This batch file would do it. Bare in mind that if you let it run until the next day before you close it then it will reset back to the previous day's date:

Code:
@ECHO OFF
SET CURRDATE=%date:~%

ECHO Changing date..
DATE 01-01-06

ECHO Starting program..
START /WAIT wordpad

ECHO Resetting date..
DATE %CURRDATE%

You'll need to run it as an admin to allow you to change the date.
 
Back
Top Bottom