a question on Trainzutil

Mutton

Member
Hi

I'm in the process of completing a utility to back up all the assets contained within a trainz installation and would like to know how do you get a full lost of authors from the trainzutil command. I know the option is there (trainzutil.exe authors) but no matter what I try I can't get any output at all.

to further explain, my backup program searches through all the local directories and for each folder it finds it moves it to another directory but sorts it on author Id so basically it puts all the same authors contents in the same directory. I would like to add the authors name that's registered to the ID as part of the directory name - (not necessary but a nice addition).

Thanks:eek:
 
This is a command line program so you need to run it on a DOS window. Type "cmd.exe /k" in the run box on the windows progam menu.
Then type your trainzutil line into the dos window that opens.
 
Yup know that, thanks. Perhaps I should be a little clearer. Even when I run trainzutil in a command prompt with the authors paramater I can't seem to capture any actual data. I've tried specifying a file name - no effect, I've tried piping the output to a file - again no effect. Allthough trainzutil does its stuff for a few seconds I can't seem to find where it places any output.

Like I say it's more for a cosmetic purpose than any real necessity as the backup program works fine as is.

BTW: Pev use your programs all the time - thanks for some excellent tools. Now if I can be a bit cheeky; I can parse through a cdp file sucessfully but I need a routine to extract/view some thumbnails as stored in the CDP. The files are stored in LZSS format but whichever algorithm I've looked at it doesn't quite seem to work. Have you produced anything yet to uncompress LZSS within a CDP or do you fancy another programming challange ;) ?

ps. I code in vb.net

Thanks
 
I have not used the program, but most utilities that run in a "DOS" window and output anything need to be told where to output it. A command like the following is probably needed:

trainzutil.exe authors > authors.txt <--- I realize you said you tried piping it, but did the command look like this?

This tells trainzutil to open an output file named "authors.txt" and dump its finding into it. Then you open the text file with notepad (or whatever you want) and read it. Or, alternatively, you can open it within your VB.NET program.

Bill
 
Last edited:
Yup, tried that :) Tried the following aswell:

trainzutil authors > output.txt
trainzutil authors >> output.txt
trainzutil authors | output.txt

What makes me think that the command isn't working is even when just using:
trainzutil authors

no output is seen. I've checked through the trainz installation but no new files are created (or updated).

Thanks
 
Hmmmm. I just tried the command in 2009 and it worked just fine.

trainzutil authors > x.txt

x.txt contained every author just like it should. What's your operating system? Mine is Vista Home Premium with all updates and SPs.

Tell me what you get if you enter

trainzutil help

EDIT: When you run this command have you navigated the command window to the same folder that trainzutil.exe resides?


Bill
 
hmmm, thats not fair ;) it still won't work for me.

Im running windows7 32bit, opened a dos prompt changed dir into E:\ts2010\bin . my ts2010 installation is in E:\TS2010. when I run trainzutil > a.txt the text file is created buit is 0 bytes in size!

Just tried this on a second macine with both ts2010 and trs2006 on. the 2010 version does just has I said ie creates an empty file, the trs2006 version of trainzutil works fine. (however doesn't produce the output I was expecting.) Oh well - at least we won the Cricket :)
 
Well, whaddya know! It won't work for me either. TR2010 on Win7 machine. Trainzutil won't give any output.

trainzutil authors

-or-

trainzutil authors > x.txt

will not work. x.txt is created, but of 0 length. Looks like you found a good bug to report.

Bill
 
BTW: Pev use your programs all the time - thanks for some excellent tools. Now if I can be a bit cheeky; I can parse through a cdp file sucessfully but I need a routine to extract/view some thumbnails as stored in the CDP. The files are stored in LZSS format but whichever algorithm I've looked at it doesn't quite seem to work. Have you produced anything yet to uncompress LZSS within a CDP or do you fancy another programming challange ;)

I have only worked on JA compression that TS2009/10 uses in-game. So no experience with LZSS. I'm not taking requests at present as I have a lots of other things on. I'm still finalising the Attachment Maker program and have some changes to make in Trainz Mesh Viewer as well. You know the old problem the last 10% of the job takes the other 90% of the time.
 
Well, whaddya know! It won't work for me either. TR2010 on Win7 machine. Trainzutil won't give any output.

trainzutil authors

-or-

trainzutil authors > x.txt

will not work. x.txt is created, but of 0 length. Looks like you found a good bug to report.

Bill

Just a shot in the dark but try downloading a utility called Unlocker. While the primary purpose of this utility is to override OS file locks, it also serves to close an open file and cause data to be finalized on disk.
 
I already have/use Unlocker. The file itself is receiving NO data from the executable when the executable completes and returns to the prompt. This means that the file showing 0 bytes means exactly that - no bytes were written to the file before it was closed.

Good idea though. Pretty much every executable written will cause any files opened by it to be forced closed by either the executable's closing sequences (best way) or by the operating system (worst way).

Bill
 
Back
Top