Written to fix problems caused by missing or wrong DirectPlay Windows Registry entries for multiplayer TA.
Those entries are only required when a TA multiplayer game instance is set up thru a game services (i.e. DirectPlay lobby launched). They have no impact on multiplayer games set up from a manually launched
In interactive mode a simple command line prompt appears at the end of the list showing the TA directories found. The following inputs are reconized (you have to finalize every input by using the
|Enter position|| up to two digits ||Selects one of the directories for further processing. You can use any number in the range of the whole list size even if it refers to a line not visible right know.|
|f(orward)|| ||Displays the next page of the directory list.|
|b(ackwards)|| ||Displays the previous page of the directory list.|
|trim l(eft)|| || Displays the maximum possible part of a path name too long to fit into a display line beginning at the left end. The left trim truncate indicator
|trim r(ight)|| || This is the counter part to the left trim option. Displays the maximum possible part of a path name too long to fit into a display line beginning at the position that allows to output the path from there to its right end. The right trim truncate indicator
|a(bort)|| ||Exits taregfix2 without taking any further actions like checking or updating the DirectPlay registry entries for TA.|
For the time being taregfix2 recognizes the well known
totala.exe versions listed below. The MD5 fingerprints have been computed based on the US version of the basic TA game, TA:CC and TA:BT. In case taregfix2 can't identify a particular
totala.exe version it may have been modified by a program other than the TA Demo Recorder version 0.98b5 or 0.99b2 installer or an old BY version of the is still installed. In this case the MD5 fingerprint of the unknown version instead the well known version string will be displayed.
| ||MD5 fingerprint||Comment|
|CDE TA 1.0||99b3105c7e7acd3599783a2e0881f741||This version was shipped with the basic game.|
|CDE TA 3.0||c8053ed575cceee39f3f573f7a9e565d||This version was shipped with the TA:CC.|
|CDE TA 3.0a||ddb75b6e06292e49c971ce42325bc562||This version was shipped with the TA:BT.|
|CDE TA 3.1c||f76d367fbbd43008ae04c0f314a61b13||This is the 3.1c patch version. It does differ from the patches made for BY which are often confused with the 3.1c patch because the BY versions are showing a '3' for the leading digit too.|
|Demo Recorder TA 0.98b5 and 0.99b2||26bfc1b8a59ef28180f0c71fa9457b5b|| When TA is installed on Windows9x or WindwosME the TA Demo Recorder installers version 0.98b5 and 0.99b2 need to modify the
taregfix2.exeeither from within a Microsoft
cmd.execommand shell console window, the Windows desktop's
Start→Runmenu or by double clicking on the file in the Windows File Explorer.
The installer incarnation
taregfix2_setup.exe will create a copy of itself in the Windows OS system root folder under the runtime incarnation's file name
taregfix2.exe. If such a file already exists there then the installer will only overwrite that file when all of the following conditions are fulfilled:
taregfix2.exeruntime instance is on the list of well known taregfix2 versions/MD5 fingerprints pairs hard wired into the installer instance.
Otherwise the installer instance will assume that a newer or identical version of TAregfix is already installed and will abort the installation,
taregfix2_setup.exe ran successfully once you can call the run time incarnation
taregfix2.exe either directly from the Windows desktop menu
Start→Run or a Windows
cmd.exe command shell window.
taregfix2 [-c] [-a] [-n] [-d <absolute TA path>] [-b <binary>] [-l <command line>] [-f <front end>] [-i <IP address> -p <TCP port>]
All parameters are optional and the simplest call format is without any parameter given. This format addresses people who don't want to fiddle around with the command line parameters. For example, if you have only one TA installation on your drive and want a quick Registry fix for it than just call taregfix2 without any switch or parameter. It will automatically locate your TA directory and update the registry without any further user interaction if the following conditions to be true:
totala.exefile in that particular directory could be identified by a well known MD5 fingerprint
Otherwise taregfix2 will come up with a list of TA directories to pick one from for further processing. To avoid the interactive mode the program would enter once it found more than one directory with a
totala.exe file use the switch
-d. Check and update operations against the registry will then be done without any acknowledgement requests even if the TA version found in
<absolute TA path> couldn't be identified by a valid MD5 fingerprint.
-c will cause the explicitly given, implicitly selected or interactively picked TA directory to be checked against the current Registry settings rather than updating the Registry data.
-a is only of interest when
<absolute TA path> is omitted. When set directories with the same folder name as the standard backup folders created by the TA expansions installers are not ignored when searching for TA installations. The only two values on the ignore list are currently
backup (created by TA:CC) and
btbackup (created by TA:BT). So if you have a TA installation residing in a folder named
C:\STRANGE\BACKUP you need to use this flag otherwise the search algorithm will ignore a
totala.exe file found there. On the other hand sub folders of ignored folders are not excluded from the search. If a TA installation resides in
C:\STRANGE\BACKUP\MYTA then the folder is recognized as a valid TA directory even without using the
-n avoids the 10 second delay before exiting the program. The delay is active by default in order to give the user enough time to read error or success messages.
-b will put the value
totala.exe in the registry entry
File. If you omit this switch then taregfix2 will put the default value
totala.exe in the registry. A prerequisite is that
<binary> resides in the same directory as indicated by the
-d switch respective as picked from the TA directory list in interactive mode. A TA game service client program will then run
<binary> instead of
totala.exe when a game session is launched. Although you can theoretically configure whatever executable file you want for the
File registry entry you have to keep in mind that the binary has to be a lobby aware application thus it must call
IDirectPlayLobby3::GetConnectionSettings at program startup and has to establish communication with the game service client via the DirectPlay7 Lobby interface once it became aware of a lobby launch. You may want to use this function if you have at least two different versions of
totala.exe in the same TA directory under different names and want to switch between them before playing a game service game. For instance if there is a hacked
totala_hacked.exe and an original
totala.exe in the TA directory
d:\games\ta and you want the game service lobby launcher to use
totala_hacked.exe rather than
totala.exe then call taregfix2 as follows:
taregfix2 -d d:\games\ta -b totala_hacked.exe
-l will put he value
<command line> rather than the targefix2 default
-c into the registry entry
CommandLine. The command line value
-c will skip the intro movie when TA is launched. Basically the
-l switch allows to configure any command line for
<binary> you want.
-f will create a registry entry for Ripple DirectPlay7 lobby launching.
<front end> refers to a program residing in the same directory as indicated by the switch
-d respective as picked in interactive mode from the TA directory list. Once the value is set in the registry the game service client program won't launch
<front end>. The difference is that
<front end> doesn't need to be a DirectPlay lobby aware application, it can be any simple executable file executing whatever operations you want. As soon as
<front end> is done with its prae-launch operations it has to call the actual application, which would usally be
totala.exe. For launching the actual application
<front end> can use a simple CreateProcess() API call thus it doesn't need to setup any DirectPlay7 communication link between the game service program which started it and the actual application to start. The only prerequisite is that
<front end> passes all command line parameters it was launched with to the actual application to be launched except the first one which is its own program name. Passing those parameters is so important because one of them is a special value that will allow the lobby aware child process to establish a direct link to the game service client program thus bypassing its father process
<front end> completely. Once the actual application runs it's save to terminate
-p allow to send the output the program generates to an echo server that runs on another computer via a TCP connection. This is intended to be used for remote support. It's a one way street (as you will see when you study the source files), there is no way for the echo server to send any data into the other direction. I added this option because I learned that some people have problems to interpret the program output and need to be talked thru the process of fixing the Windows registry, especially if more than one TA installation was found and they get stuck at the selection screen. To display the echo output on the other computer you need to launch an echo server program there that can handle the echoed output taregfix2 streams to the given IPv4 address and TCP port number. I provided a very simple EchoStream server which should be sufficient for use with taregfix2. Since activating the echo interface requires to launch taregfix2.exe with command line switches I also decided to add the option to put the IPv4 echo server address and the TCP port number in a simple text file named
taregfix2.cfg. The first line has to contain the IPv4 address, the second line the TCP port number. The file must be placed in the same folder where
taregfix2.exe resides in order to be recognized by
taregfix2.exe. Do not add the switches
-p to the lines in
taregfix2.cfg, just put the actual values in. The command line parameters
-p have a higher priority than the entries in
taregfix2.cfg, thus the file is ignored if the program was called with any of these two parameters.
Be aware that game service client programs might override any of the DirectPlay related registry entries mentioned above at any point in time.
Some of the exit codes are returned by both incarnations of taregfix2 (the installer
taregfix2_setup.exe and the run time
taregfix2.exe) others only by one of the two. The
Used by column will state which of the incarnations may return which value. All registry entries referred in the table below are located at the key:
The documented exit codes are only valid for the latest version. Previous versions may return different values.
|0||both incarnations||No error occured.|
|1|| ||The OS API call GetWindowsDirectory() failed with an OS error. The program wasn't able to retrieve the path of the OS software root directory. Check the OS error part of the message for more details.|
|2|| || The OS API call CreateFile() failed with an OS error. The program couldn't open the source file
|3|| || The OS API call CreateFile() failed with an OS error. The program couldn't open the destination file
|4|| || One of the OS API calls ReadFile() or WriteFile() failed with an OS error.
|51|| || An OS error occurred when the program tried to initialize the TCP/IP interface on the local computer. This error can only occur if the switches
|52|| || The switch
|53|| || The OS API call socket() failed with an OS error. This can only occure when the switches
|54|| || The OS API call connect() failed with an OS error. This can only occure when the switches
|55|| || The OS API call send() failed with an OS error. This can only occure when the switches
|101||both incarnations||The OS API call GetModuleFile() failed with an OS error. The program wasn't able to retrieve the path from where the program was launched. Check the OS error part of the message for more details.|
|102||both incarnations||The program was called by using the wrong syntax. The order of the parameters doesn't matter but certain combinations are not allowed.|
|103|| || An attempt to open the echo server configuration file
|104|| || A read operation on the successfully opened echo server configuration file
|105|| || Unexpected end of file marker was encountered when processing the successfully opened echo server configuration file
|201|| ||An OS error occurred when retrieving the fixed drive list. Check the OS error part of the error message for possible reasons.|
|202|| ||The fixed drive list was too long to fit in the buffer taregfix2 provides. The buffer can hold a maximum of 27 drive letters.|
|205|| || No folder containing a
|301|| || An OS error occurred when taregfix2 tried to open a
|401|| || The program can only maintain up to 99 directories containing a
|402|| ||The program switched to interactive mode because the user had to make a choice between different possible TA installation folders and the user has picked the abort option.|
|501|| || OS API call CreateFile() failed when probing existence of
|502|| || OS API call CreateFile() failed when probing existence of
|503|| || An OS error occurred in check mode (switch
|504|| || An OS error occurred in check mode (switch
|505|| || The program runs in check mode (switch
|506|| ||An OS error occurred in update mode when the program tried to create or access the registry key object itself (not one of it's value strings). Check the OS error part of the message for more details.|
|507|| || An OS error occurred in update mode when trying to create or update one of the registry values
|508|| || An OS error occurred in update mode when trying to delete an existing value entry for the registry entry
From version 18.104.22.168 on two manifestations of the same binary file exist:
taregfix2.exe. Since it's the same binary file just carrying a different name the MD5 fingerprint for both instances has to be the same. All Windows registry values referred in the sections below are located at the key:
Launchercan now be customized too by using the new switches
taregfix2_setup.exereported 'file does not exist' after copying the program into the Windows OS folder when no previous version was found. It turned out that WindowsME doesn't reset the GetLastError() state state before executing the OS API call ReadFile() while Windows2000 does. This lead to a wrong interpretation of the current error state after leaving the copy loop. Fixed by using the API call result values of ReadFile() and WriteFile() rather than relying on GetLastError().
-pswitches for echo server can be replaced by entries in the file
taregfix2.cfg. The IPv4 address has to be stored as dotted string in the first line of the text file, the TCP port number in the second line of the file. The switches
-pmust not appear in this file.
taregfix2.exefile can be found there. If such a file exists and if it's recognized as an older version it will be overwritten with the binary file of the running version.
md5.cwith memcpy() and memset() as recommended (though calculation speed of MD5 fingerprints wasn't a performance issue even with the loops).
totala.exestring from registry command line entry. The command line now contains only the
-cswitch to suppress the intro movie when TA is launched.
System Volume Informationowned by OS user account system from TA folder search in order to avoid program abortion due to access denied OS error.
taregfix2's source code is available for download. The source package is suited for use with Microsoft Visual Studio C++ 2008 and 2010.