Thursday, September 13, 2012

Create an Ultima Online Classic Client Patch Archive

Note:  This will be a quick and messy post, I may return later to clean it up.
Patching methods changed in 7.0.24.  This works on all versions up to 7.0.24.

Begin:

If you have ever played Ultima Online or you have played one of many Player Run servers, you know that patching can be a pain at times. Many years ago (I started with Ultima Online: Renaissance, and quit sometime around Age of Shadows / Samurai Empire) updating over 56K was a multiple day run. Back then I found a way to keep the installer from purging the patch files. I would back them up so I could manually feed them to the patch application anytime I re-installed Ultima Online. I'll detail the process for doing so here.

If your like me (only play EA servers when they give away a free month), you probably have an old client laying around. Mine is 7.0.10.3, and it has quite a few patches (about a Gig) before it is to the main stream version. We can capture the patch files from a fresh install using the following method:

Requirements:

  1. Download: http://technet.microsoft.com/en-us/sysinternals/bb842062.
    We are going to create some settings that can only be altered by the system account. PsExec.exe will give us this ability.
  2. An Administrator Account.
  3. A full installer for an Ultima Online Version.

Install Ultima Online Classic Client:

Use the installer you have on hand.  I use 7.0.10.3.
Once it has finished installing, do not run or update the client.  
If it starts automatically stop it.


Create "patch" folder:

In the Ultima Online Classic Install Directory you need to create the patch folder manually.  The default install Location is: 
"C:\Program Files (x86)\Electronic Arts\Ultima Online Classic\"
Once created we will have to alter the Permissions.


Apply Settings:

Right Click "patch" and select Properties

Click Advanced and then Click Change Permissions

Remove the Check on "Include Inheritable Permissions" and Apply.  Chose "Add" to copy permissions.
Check the Option to "Replace all Child Object Permissions"



"Edit" the "TrustedInstaller" Permission to "Deny" the following. Click "Ok".

Set the following for "Administrators" (Group) and "Creator/Owner".  It is important to leave "change Permissions" and "Take ownership" unchecked.  If you explicitly "Deny" them then the process to regain control becomes much more involved.
Click on the "Owner" tab.
Click "Other Users or Groups".  Type "System" and Click "Check Name".  Click "Ok".

Set the new Owner to the "patch" folder to the new "System" Entry.
Click "Apply" and "Ok" on all the windows. So that the settings all take effect.  When asked about "Setting Permissions" and "Account Controls" for all the Sub/Child files/folders, Click "OK", "Yes", Any Agree Option.


Run Update:

In vercfg.cfg change compassion.owo.com 8888 to patch.uo.eamythic.com 8888
You will now be able to run the Updater.  All patches are downloaded and applied, but the failure to delete the patch will not cause the updater to error.  Once you are up to 7.0.24, or your target.  Cancel the download, or let 7.0.24 run until it says update complete.  Copy all the files in "patch" to a location that you can archive them.


Regain Control:

  1. Open cmd "As Administrator"
  2. PsExec.exe -i -s cmd.exe 
  3. Default directory shown:
    cd "C:\Program Files (x86)\Electronic Arts\Ultima Online Classic\"
  4. cacls ./patch /e /c /g [An_Administrator_Account]:f
  5. cacls ./patch/*.* /c /g [An_Administrator_Account]:f
    As the Administrator account you will now have full control over the directory.  I also recommend an uninstall if you ran all the way to 7.0.24.


    To use Patches:

    1. Install the client.
    2. In vercfg.cfg change compassion.owo.com 8888 to patch.uo.eamythic.com 8888
    3. Create"patch" folder.
    4. Steps 4 - 5 are only to apply Specific Versions.
    5. Copy only the patches you wish to apply.
    6. In the settings for the patch folder remove both "Create Files / Write Data" and "Create Folders / Append Data" permissions (Don't deny them) for the "patch" folder.  Do this for all Accounts.  Do not remove the attribute entries, this will make it harder to regain control of the directory.
    7. Continue Below For all Installs.
    8. Start Ultima Online Classic, it will apply all patches in the patch directory without downloading those patches.
    9. If you performed step 5 and 6 - You see a denied write message when the installer attempts to download the next patch.  This will end the patch Cycle.

    Notes:

    Once you install Patch 7.0.24 you will be upgraded to the New Client and New Map Files.  The installer for this version forward only installs the latest version. 

    If you are patching up from version 7.024 and earlier: The client will not run after the 7.0.24 update until the latest version is installed.

    If you use UOAM or UOCartographer You should copy out all the Pre-7.0.24 map files so that they can build their maps.  Other wise they will not build the map resources and you map will be all black.