File: /~heha/hs/fakedate.zip/FakeDate.txt

         For english description, see middle of this file

	==================================================
	 FakeDate - "Zeitmaschine" für einzelne Programme
	==================================================

Häufig wird Demosoftware zeitlich so stark limitiert, dass man als
mit vielen anderen Aufgaben beschäftigter kaum eine Möglichkeit hat,
solche Software ausgiebig zu testen.

Lösungen, die mit dem (mehr oder weniger automatischen) Verstellen
der Systemuhr einhergehen, sind zwar simpel und auch ziemlich sicher
bezüglich ihrer Wirkung, die Nebenwirkungen sind aber auch nicht
zu übersehen:

* Solange das Programm läuft, ist die Uhr falsch. Das führt (bes. in
  vernetzen Umgebungen) zu falsch datierter Email, falschen Datei-
  Modifikationszeiten usw.
* Vergisst man, die Uhr wieder vorzustellen, bspw. weil der Rechner
  abgestürzt ist, geht sie womöglich lange Zeit unbemerkt weiter
  falsch.
* Für mehr als 1 Programm geht es (meistens) nicht.
* Man benötigt (unter NT-basierten Systemen) das Recht, die Uhr
  zu stellen.

Dabei sind im Internet herumgeisternde Uhr-Automatisch-Steller
nicht gerade winzig, VB, VCL bzw. MFC sei Dank!

Dieses Programm nun steckt die eigentliche Anwendung in eine Art
"Sandkasten" und gaukelt bei den drei Windows-Systemfunktionen
zum Holen von Datum und Uhrzeit ein fest angebbares Datum vor.
Andere Programme bleiben davon unbehelligt.

Version1: Die Idee und eine Menge Kode dazu lieferte das c't-Projekt
"InstallWatch" (IWATCH.EXE) von Matthias Withopf. Genauso wie dieser
"Ur-Kode" kommt FakeDate ohne Laufzeitbibliothek aus.
Diesmal habe ich nicht den gesamten Kode verstanden, sodass eine
Kompilierung und das Testen für die Alpha-Plattform noch aussteht.

Version2: Dieses oberflächlich identische Programm arbeitet mit dem
»DETOURS«-Paket von Microsoft, anstelle von IWATCH, für bessere Funktion
unter Windows NT, Windows 2000 und Windows XP.
ACHTUNG: Diese Version läuft nicht unter Windows 95, 98 und Me

Anforderungen:
--------------
* Windows 95 oder höher, Windows NT 3.51 oder höher
* Die Anwendung muss 32bittrig sein!
* Programme, die ihrerseits andere Programme (Kind-Prozesse) starten,
  werden zwar korrekt emuliert, nicht aber die Kind-Prozesse;
  eine probeweise Abhilfe schafft ein weiterer, von Hand
  vorzunehmender Eintrag in der FakeDate.INI:
	[Config]
	Inherit=1		;inherit <engl.> = vererben
  Die Wirkung des Schalters ist nicht ausreichend getestet,
  möglicherweise hagelt es Schutzverletzungen!
  Der »Inherit«-Schalter hat keine Wirkung bei Version2!

Installation:
-------------
* ZIP-Archiv auspacken
* Für bequeme spätere Verwendung FakeDate.exe und FakeDate.dll
  ins Windows-Verzeichnis kopieren

1. Verwendung:
--------------
* Starten Sie FakeDate.exe (»Version1« ist vorzuziehen)
* Geben Sie im folgenden Dateiauswahldialog die Zielanwendung an
* Ändern Sie im der folgenden Datumseingabe das Datum für alle
  folgenden Aufrufe.

2. Verwendung:
--------------
* Zwei Punkte wie oben, das Programm startet unter Beibehaltung
  des zuletzt angegebenen Datums.

x. Verwendung:
--------------
* Ändern Sie im Startmenü den Eintrag zum Start der Zielanwendung,
  indem Sie "FakeDate " (ggf. mit Pfad)  davor schreiben.
  Beachten Sie das Leerzeichen zwischen »FakeDate« und der Zielanwendung!

Deinstallation (nur von Hand):
------------------------------
* Löschen Sie FakeDate.*
* Machen Sie die Änderungen im Startenü rückgängig

Copyright und Garantie:
-----------------------
Dieses Programm ist Freeware und darf sowohl privat als
auch kommerziell verwendet werden. Gebühren dürfen nicht
erhoben werden.
Der Quelltext darf weiter verwendet werden. Fragen zum
Quelltext bitte an die unten angegebene Adresse mailen.

Ich übernehme keine Garantie für die Funktion des Programms,
und auch nicht für Schäden, die durch (meinerseits
ungewollte) Fehlfunktionen entstehen.

haftmann#software, 07/04, henrik.haftmann@e-technik.tu-chemnitz.de




	 =================================================
	  FakeDate - a "time machine" for single programs
	 =================================================

You want to run a time-limited demo or evaluation software
but you have a full-time job - full with other work?
Often such software expires before you can test it thoroughly.

There are some solutions in Internet - all of these programs
help to set to past (or future) the system clock when a program starts,
and to set the clock back when that application terminates.
But there are a couple of side effects:

* While the application is running, the clock goes wrong. You will send
  wrong-dated email, set wrong modification times on files etc.
* If you forget to set the clock manually after the computer has
  crashed, wrong time may be undetected for a while.
* You may get into trouble if you want to run more than one
  such a program
* You need the privilege to set the clock (NT based systems only)

Rarely those programs are small due to VB, VCL, or MFC.

This program, FakeDate, puts the application in a sandbox and
fakes the three Win32 system calls to always deliver the same
day. Other programs are not affected at all.

Version1: The idea and the overwhelming C++ source came from c't project
"InstallWatch" (IWATCH.EXE) by Matthias Withopf. As IWATCH,
FakeDate doen't need a runtime library and is therefore very small.

The new Version2 uses the »detours« package from Microsoft instead of
c't IWATCH for more robust operation on NT based systems.
Due to limitations of DETOURS, it doesn't run on Windows 95, 98, and Me.

Requirements:
-------------
* Windows 95 or newer, Windows NT 3.51 or newer
* The application must be a Win32 app!
* Child processes are not faked by default. You may override this
  behaviour by making an entry in FakeDate.INI by hand:
	[Config]
	Inherit=1
  But note: This switch is not thoroughly tested, crashes and UAEs
  are possible.
  This switch has no functionality in Version2 of FakeDate!

Installation:
-------------
* unzip archive
* For convenience, copy FakeDate.exe and FakeDate.dll
  into Windows directory

First use:
----------
* Start FakeDate.exe (try from "Version1" directory first)
* Select an application in the following dialog
* Change the date in the following dialog to meet the application's
  needs.

Second use:
-----------
* Take the two first points above. The program will now run with the
  date given at first use.

X. use:
-------
* Change entry in your Start Menu, prepend "FakeDate " (+path) left
  to the application's .EXE file name. Note the space after »FakeDate«

Deinstallation (only by hand):
------------------------------
* Delete FakeDate.* files
* Undo changes in your Start Menu

Copyright and Warranty:
-----------------------
This program is Freeware and may be used commercial and at home.
Fees are not allowed.
You may take the source code and do what you want, but ask
Matthias Withopf if you want to make money with that code,
or refer to the license agreement of »detours« package.
Questions about the source you may email to the address below.

Because it's freeware, I cannot give _any_ warranty.
So, although it's not intended, if this program eats your data and/or
crashes your hard disk, you install and use it at your own risk!

haftmann#software, 07/04, henrik.haftmann@e-technik.tu-chemnitz.de


Change Log:
-----------
07/03:	first release
08/03:	Added "inherit" switch for faking child processes
01/04:	Changed date entry to CommonControls DatePicker
	 (Not tested on first Win95 release.)
	Extension .EXE no more necessary - using FindExecutable()
Version2:
07/04:	Completely rewritten using Microsoft »detours« package
	(but file size is much larger due to standard library)

03/05:	Added fake for IsDebuggerPresent(), but for first
	for Version1 only. Bi-lingual resource. MS Shell Font.
Detected encoding: ANSI (CP1252)4
Wrong umlauts? - Assume file is ANSI (CP1252) encoded