Hallo Travis!

>Heheh.  I wrote a program once that handled setting the date for you
>so you could run an expired program.  After the program finished, you
>could

>dig up another copy of it if someone wanted it.  It was a whooping
>10-20 lines of code in pascal.

The same function is even possible to do in batch files - in Win98! and
nearly all other DOS-based systems.

(commented. Remove comments to bring it to work.)

Put a file containing only a CR somewhere
c:
cd \temp
echo. >cr.dat

Write the output of the date command (including today's date) into a
batch file somewhere, using the previously prepared CR-file to simulate
the RETURN keypress
date <cr.dat >date2.bat

Set desired system date
date 29.10.1998

start application in another session. For a DOS program use "start
<something> In Win 3.X this will not work. You need a package called
Winstart for that. I do not know where to get that. In DOS it will wait
until appl. is finished.
cd <somewhere>
<something>

wait 30 seconds until application has checked the date ( don't do that
in DOS, see above)
choice /n /t:j,30 >nul

go back, delete the CR file
c:
cd \temp
del cr.dat

now comes the tricky stuff. Create a batch file containing "date %3" on
disk where %3 is the position of the date in the text the date command
prints (it says something like "actual date is 1-1-2001. New date:" I
don't know exactly what it says as I have a german version. The batch
file has to be named like the first 8 characters of the first word of
the DATE output. Here it should be called ACTUAL.BAT.
echo date %%3 >actual.bat

now call the file containing the output of the date command which will
be interpreted as a batch file and therefore chain to ACTUAL.BAT with
the date as the 3rd parameter where ACTUAL.BAT will use this parameter
to supply it to the DATE command to set your system date to what it was
before.
call date2

clean up the mess.
del actual.bat
del date2.bat

Hard stuff, isn't it? But really works in Win 98. DOS isn't dead...

Bye Gunnar

--
Gunnar Th�le

To unsubscribe from SURVPC send a message to [EMAIL PROTECTED] with 
unsubscribe SURVPC in the body of the message.
Also, trim this footer from any quoted replies.

Reply via email to