XPINSTAL.TXT                                                          v9.45.06
Robin Shirley                                                       8 Jul 2002


                 Installing Crysfire 2002 under Windows XP
                      
The installation procedure under Windows XP has to be completely different
because it will not allow changes to be made to its main Windows directory.

This also applies if for any other reason you are prevented from making changes
to your main Windows directory - for example, if running on a network under
Windows 2000 where the system administrator has given protected status to the
main Windows directory.

Thus if you wish to install Crysfire under Windows XP or in any other situation
where you are prevented from making changes to the main Windows directory,
you *must* follow the procedure described below, rather than the method using
CFsetup that is described in INSTALL.TXT.

Trademarks mentioned are acknowledged as belonging to their respective owners.


Why the Procedure has to be Different under Windows XP
------------------------------------------------------

The installation procedure described above, which works well under all previous
Windows versions, can't be used for Windows XP.

This is because XP treats the Windows directory as a protected area that is
monitored for changes or additions, which will automatically be detected and
promptly reversed.  Hence the installation and launch procedures for Windows 9x,
etc., will be ineffective, because the two files that are copied into
C:\WINDOWS will rapidly be deleted by XP.

Since the default PATH under XP does not contain any directories that the user
can make changes to, it becomes necessary to make changes to the PATH.

Thus the installation procedure under XP becomes effectively the same as the
method that will be familiar to Crysfire 2000 users, requiring the execution
PATH to be edited so as to include the Crysfire 2002 home directory.

If you already have a Crysfire 2000 installation in C:\CRYSFIRE, the easiest
way will be simply to delete its files and expand the 2002 zipfile in the same
directory.  Since that directory will already have been put on the PATH (for
running Crysfire 2000), Crysfire 2002 will also be able to bootstrap directly
from there.

Note that it will then become particularly important to ensure that no older
competing versions can be picked up from other directories on the PATH - see
the section below, headed "Notes for Crysfire 2000 Users".


Installation Procedure for Windows XP
---------------------------------------

The Crysfire 2002 installation procedure under Windows XP is thus as follows:

1)  Download the current Crysfire 2002 distribution zipfile

2)  Create a directory (folder) on your hard disk to act as your Crysfire
    home directory.  It can have any DOS-acceptable name (i.e. 8.3 characters),
    but unless you have some other preference, it's suggested that you use
    C:\CRYSFIRE, then you won't need to edit CF_HOME.BAT in step 4 below.

3)  Copy the distribution zipfile into the home directory that you have just
    created.  Use a suitable utility such as WinZip to expand all its files
    into that directory.

4)  The script CF_HOME.BAT tells the system the name of your Crysfire home
    directory.  The default is C:\CRYSFIRE (it doesn't matter whether this is
    in upper or lower case).  If that was the name you gave your Crysfire home
    directory in step 2, no action is needed here and you can proceed to step 5.

    However, if the home directory that you created in step 2 above was not
    C:\CRYSFIRE, you must now use a text editor (for example WordPad or
    DOS EDIT) to change the directory name in CF_HOME.BAT from C:\CRYSFIRE to
    whatever name you gave your Crysfire home directory in step 2.

5)  Don't waste time running CFsetup as described in INSTALL.TXT - its effects
    will be brief and temporary, for the reasons explained above.

    Instead, edit the "PATH=" line in AUTOEXEC.BAT so as to insert (or append)
    the path to the Crysfire home directory (as created in step 2 above).  If
    you accepted the default pathname of C:\Crysfire for the Crysfire home
    directory, this will simply mean inserting "C:\Crysfire;" into the PATH=
    line, anywhere following an existing semicolon.

6)  As discussed above, probably Crysfire 2002 will now be ready to run.

    But, like previous Crysfire releases, it communicates between its
    sub-systems via environment variables, so it will encounter problems if
    there is not enough environment space available.  If that happens, a
    screen message should be displayed, advising how to increase the
    environment memory allocation.  About 1024 to 2048 bytes of space for
    environment variables is recommended, depending on how much is already in
    use by other parts of your system.  See the "Environment Variables" notes
    below on how to check and update this.


Running Crysfire 2002
---------------------

All that's needed to run Crysfire 2002 is to open a DOS prompt in the directory
(folder) containing the data that you wish to analyse.

A quick way to open a DOS prompt under XP is to right-click on the data
directory (in Windows Explorer) and select the option to open a DOS prompt in
that directory.

Type Crysfire at the DOS prompt (in upper or lower case) and press ENTER.

The Crysfire system will then be launched and your dataset can be loaded using
the LO command.  For more further information, type ? (Help) at a Crysfire
command prompt.


Notes for Crysfire 2000 Users
-----------------------------

While Crysfire 2002 is completely *compatible* with all your old datasets and
output files, it has been radically rewritten and is TOTALLY INCOMPATIBLE with
previous Crysfire executable files.  It won't work if they get in on the act.

This means that it's essential to ensure that Crysfire 2002 can't inadvertantly
pick up any of your old Crysfire executables.

For this reason it is recommended that you do the following:

a)  If your old Crysfire directory was C:\CRYSFIRE, at least rename it and
    preferably move its contents completely from your system, before installing
    Crysfire 2002.  There can then be no conflict with your new Crysfire home
    directory, which can take the default name and simplify the installation.

    If you're concerned that the new version may run into problems, then keep
    the old Crysfire directory backed up somewhere (preferably offline) - but
    trust me, you're unlikely to need it again.

b)  Unlike the old Crysfire directory, the new Crysfire 2002 home directory
    doesn't need to be on your execution PATH, and preferably shouldn't be.

    Thus now would be a good time to edit it out of the PATH (in AUTOEXEC.BAT),
    especially if both are called C:\CRYSFIRE, which may well be the case.
    Leaving it on the PATH will bring no benefits, and could cause odd things
    to happen if a Crysfire component happened to have the same name as a
    program belonging to some other powder diffraction application.

c)  The recommended way to run any Crysfire version is to use one or more data
    directories (i.e. folders) to keep different problems separate, and not to
    keep them in the Crysfire home directory among its distribution files and
    programs, which leads to problems with housekeeping, updating and backup.

    If you previously did keep work in progress within the Crysfire directory,
    now is a good time to move it somewhere else, preferably into an organised
    directory tree.  For security, I'd recommend that you don't use a
    sub-directory of the Crysfire home directory, so that if that were to
    become corrupted, your data would be unaffected.


Environment Variables
---------------------

If Crysfire 2002 fails to run, reporting "out of environment space", you have
probably already used up most of your environment allocation, and so need to
increase this to e.g. 1024 or 2048 bytes, using the SHELL command in CONFIG.SYS
via its /e parameter - e.g. /e:2048 for 2048 bytes.

Thus, to provide 2048 bytes of environment space, insert the one of the
following "shell=" lines in your CONFIG.SYS file, as appropriate:

    (Windows 9x, etc)  shell=C:\WINDOWS\COMMAND.COM C:\WINDOWS /e:2048 /p
    (DOS/Windows 3.x)  shell=C:\COMMAND.COM C:\DOS /e:2048 /p

Special action is required under Windows ME (which ignores CONFIG.SYS), as
follows:

    Right-click on the Crysfire (or MSDOS) icon on the Windows desktop, and
    choose "Properties" then "Memory".  Change the setting for the "Initial
    Environment" from "Auto" to a suitable value such as 2048 (the largest
    available is 4096).

So far, Windows XP users don't seem to have experienced environment-variable
problems running Crysfire 2002.  I don't currently run an XP system, so if
if you do have problems and the above suggestions don't help, please consult
the XP help system and/or support facilities (and let me know what works best,
so that I can add it to future versions of this file).

