Downloading using TrainzUtil - TS2009 SP4 and later (possible 'Invalid Content' fix)

shaneturner12

Tutorial Creator
Whilst browsing the help information for TrainzUtil, I've found that it is possible to install a DLS asset without using FTP or Content Manager. Note that this does not include dependencies.

This method may allow assets that appear as 'Invalid Content' or 'Unknown Content' to install, as long as the content is not for a later version.

Where I use <> marks, replace the <> marks and their contents with the correct information mentioned. (<trainz install folder> = the folder you have installed Trainz to, <KUID> = The full KUID of the asset you wish to install.

Note: If the path you have installed Trainz to contains spaces, you must put the whole path up to the trainzutil.exe between double quotes ("").

The process is as follows:

1. Open Command Prompt. If using Windows Vista or 7, Command Prompt must be run as administrator. (If you are not sure how to open the command prompt, read the Loading the Command Prompt section of http://trainz.shaneturner.co.uk/tutorials/index.php?page=command-line-database-repair. (Right-click this link and click Open in New Tab or equivalent)
2.Once Command Prompt is open, type the following command, then press Enter.

Code:
"<trainz install folder>/Bin/trainzutil.exe" installfromdls "<KUID>"

This will start a TADDaemon and one or two TrainzUtil session(s), and will proceed to download and install the requested asset. You will be informed when the asset is installed and committed. Wait for TADDaemon to close before you do anything else.

3.If you do not have the 'Automatically Commit when installing CDPs' box ticked in the Content Manager settings, you will need to do the following extra command:

Code:
"<trainz install folder>/Bin/trainzutil.exe" commit "<KUID>"

Be aware that if the asset has dependencies, you will need to use Content Manager to find the dependencies.

Hopefully this will come in useful for users who find it too awkward to use Content Manager to install simple assets.

Shane

P.S. If you want to install multiple KUIDS in this fashion, create a text file with the word 'installfromdls' followed by the KUID for each KUID (one per line, and must have " marks at the start and end of each line), then use the following command:

Code:
"<trainz install folder>/Bin/trainzutil.exe" @"<location and filename of text file>"
 
Thankyou for your comment Zachary.

Hopefully, this will reduce the amount of 'Invalid Content' issues (unless the content is for a later version).

Shane

P.S. I'm looking forward to reading your next blog post.
 
Could you please make an example of what to enter into Command Prompt?
I tried this but it's not working: C:/Program Files(x86)/N3V Games/Bin/trainzutil.exe installfromdls "<KUID2:276733:100470:2>"

Thanks in advance :)
 
Blog entry amended. If the path contains spaces, you must include the "" marks up as far as the trainzutil.exe.

In your case, this would make it "C:/Program Files(x86)/N3V Games/Bin/trainzutil.exe" installfromdls "<KUID2:276733:100470:2>"

Shane
 
Back
Top