shaneturner12
Tutorial Creator
Moderators - if this is in the wrong place, please put it in the right place.
Hi Trainzers,
Below is a reference to the most useful TrainzUtil commands in TS2009 SP4, TS2010, and TS12. Certain commands in this list may also work in earlier versions, but this is not guaranteed.
For those who do not know how to access the required Windows feature, see the bottom of this post. Items in <> are where you need to enter information.
Useful TrainzUtil Commands
To use these commands, you will need to be in the folder that contains TrainzUtil - before starting, read the information at the bottom. I have personally found that using \ rather than / in the paths works better.
For entries that require a KUID, the KUID needs to be entered without the <> marks.
Note - in TS2009 SP4 and later, these TrainzUtil commands will trigger a TADDaemon process. Wait a few minutes before closing down your system.
Trainzutil installCDP <full path and filename of .cdp file> - This will install (and commit by default) a CDP file. Be aware that if the path or filename to the .CDP contains spaces, the entry must be entered in quotes.
Trainzutil installfrompath <full path for content> - This will install content from a given folder (not including CDP files - the folder needs to contain the config.txt/config.chump and other related asset files). It comes in useful to install non-CDP content from an earlier version.
Trainzutil installfromdls <KUID> - This will install content directly from the Download Station, but will not include dependencies.
Trainzutil edit <KUID> - This will open an asset for edit.
Trainzutil printconfig <KUID> - This can be used to display a config.txt file in the Command Prompt window. If > <path and filename including .txt> is added, it will write it to a text file.
Trainzutil backupkeywords or Trainzutil importkeywords - these are fairly self-explanatory. They perform the Back Up Keywords or Import Keywords features that are in Content Manager.
Trainzutil commit <kuid> - This is used to commit an asset.
Trainzutil revert <kuid> - This is used to revert an asset.
Trainzutil delete <kuid> - This is used to delete an asset. Be aware that assets deleted using TrainzUtil may become irrecoverable.
Trainzutil generatecdp <full path and filename for CDP> <kuid list> - This is used to generate a CDP file from the KUIDs mentioned in the KUID list. The KUIDS need to be entered with a space between each KUID.
Trainzutil repairdatabase - This is used to perform a command-line database repair. This can be used if a database fault is preventing Trainz from loading correctly.
These are the main entries, but there are others - use trainzutil help to find these out.
How do I gain access to these?
You will need to open Command Prompt first. To do this:
Windows XP and earlier
1.Click Start, then Run.
2.Type in 'cmd' (Windows XP) or 'command' (earlier versions), then click OK.
(note: you need to be running as an admin user to do this)
Windows Vista/7
1.Click Start, then type 'command prompt' in the search box.
2.You should get 1 result: Command Prompt. Right-click this and click Run as administrator, then click Continue or Yes when prompted.
Once you have loaded Command Prompt, enter the following command then press enter:
cd <trainz install folder>\bin
If your Trainz path contains spaces, use this:
cd "<trainz install folder>\bin"
Replace <trainz install folder> with your actual Trainz install location, including the drive letter.
Once this is done, you can then use the TrainzUtil commands given above.
Comments/Questions?
If you have any questions/comments, feel free to post a reply. I can include further information if needed.
Bear in mind that a certain amount of knowledge in how to run programs etc. is required.
Shane
Hi Trainzers,
Below is a reference to the most useful TrainzUtil commands in TS2009 SP4, TS2010, and TS12. Certain commands in this list may also work in earlier versions, but this is not guaranteed.
For those who do not know how to access the required Windows feature, see the bottom of this post. Items in <> are where you need to enter information.
Useful TrainzUtil Commands
To use these commands, you will need to be in the folder that contains TrainzUtil - before starting, read the information at the bottom. I have personally found that using \ rather than / in the paths works better.
For entries that require a KUID, the KUID needs to be entered without the <> marks.
Note - in TS2009 SP4 and later, these TrainzUtil commands will trigger a TADDaemon process. Wait a few minutes before closing down your system.
Trainzutil installCDP <full path and filename of .cdp file> - This will install (and commit by default) a CDP file. Be aware that if the path or filename to the .CDP contains spaces, the entry must be entered in quotes.
Trainzutil installfrompath <full path for content> - This will install content from a given folder (not including CDP files - the folder needs to contain the config.txt/config.chump and other related asset files). It comes in useful to install non-CDP content from an earlier version.
Trainzutil installfromdls <KUID> - This will install content directly from the Download Station, but will not include dependencies.
Trainzutil edit <KUID> - This will open an asset for edit.
Trainzutil printconfig <KUID> - This can be used to display a config.txt file in the Command Prompt window. If > <path and filename including .txt> is added, it will write it to a text file.
Trainzutil backupkeywords or Trainzutil importkeywords - these are fairly self-explanatory. They perform the Back Up Keywords or Import Keywords features that are in Content Manager.
Trainzutil commit <kuid> - This is used to commit an asset.
Trainzutil revert <kuid> - This is used to revert an asset.
Trainzutil delete <kuid> - This is used to delete an asset. Be aware that assets deleted using TrainzUtil may become irrecoverable.
Trainzutil generatecdp <full path and filename for CDP> <kuid list> - This is used to generate a CDP file from the KUIDs mentioned in the KUID list. The KUIDS need to be entered with a space between each KUID.
Trainzutil repairdatabase - This is used to perform a command-line database repair. This can be used if a database fault is preventing Trainz from loading correctly.
These are the main entries, but there are others - use trainzutil help to find these out.
How do I gain access to these?
You will need to open Command Prompt first. To do this:
Windows XP and earlier
1.Click Start, then Run.
2.Type in 'cmd' (Windows XP) or 'command' (earlier versions), then click OK.
(note: you need to be running as an admin user to do this)
Windows Vista/7
1.Click Start, then type 'command prompt' in the search box.
2.You should get 1 result: Command Prompt. Right-click this and click Run as administrator, then click Continue or Yes when prompted.
Once you have loaded Command Prompt, enter the following command then press enter:
cd <trainz install folder>\bin
If your Trainz path contains spaces, use this:
cd "<trainz install folder>\bin"
Replace <trainz install folder> with your actual Trainz install location, including the drive letter.
Once this is done, you can then use the TrainzUtil commands given above.
Comments/Questions?
If you have any questions/comments, feel free to post a reply. I can include further information if needed.
Bear in mind that a certain amount of knowledge in how to run programs etc. is required.
Shane
Last edited: