Serz.exe in VB.net

General discussion about RailWorks, your thoughts, questions, news and views!

Moderator: Moderators

Locked
User avatar
67016
Been on the forums for a while
Posts: 299
Joined: Sat Mar 13, 2010 7:02 pm
Location: 71J

Serz.exe in VB.net

Post by 67016 »

Im currently writing a program in VB.net to alow people to easily add lights to locos in RW. I want to make it so that the user can open a .bin file however i cant seem to get serz.exe to convert from . bin to .xml Is there a certain way that i have to do it? This is the code im using

Code: Select all

Process.Start("serz.exe", filename)
shanyiqua
Been on the forums for a while
Posts: 262
Joined: Tue Dec 20, 2011 11:48 am

Re: Serz.exe in VB.net

Post by shanyiqua »

Hi!

in java i use this:

Runtime.getRuntime().exec(SERZCMD+origFilePath).waitFor();

and SERZCMD is a constant which contains this string "serz.exe "
origFilePath is an absolute path to the bin.

(and of yourse waitFor() method makes my program to wait for serz to finish it's work.
User avatar
Reppo
Established Forum Member
Posts: 308
Joined: Sun Oct 14, 2007 5:38 pm
Location: Santiago de Chile

Re: Serz.exe in VB.net

Post by Reppo »

You can create a .bat file with the lines command to execute the serz function, then you can execute this bat file from your VB program with shell function.

I did it and it works perfectly.

Sorry for my english.

Regards.

Ricardo.
Image
The man who doesn't follow his vocation betrays himself and condemns himself to unhappiness.
User avatar
67016
Been on the forums for a while
Posts: 299
Joined: Sat Mar 13, 2010 7:02 pm
Location: 71J

Re: Serz.exe in VB.net

Post by 67016 »

Thanks, I solved the problem, its just down to windows not letting me edit files in the RW directory.
User avatar
mikesimpson
Very Active Forum Member
Posts: 6361
Joined: Mon Dec 03, 2001 12:00 am
Location: Southern Hemisphere Penal Colonies
Contact:

Re: Serz.exe in VB.net

Post by mikesimpson »

67016 wrote:Thanks, I solved the problem, its just down to windows not letting me edit files in the RW directory.
Hi Kris,

I think you will find that the majority of users have their Steam directory in c:\Program Files (x86)\ so unless you tell them that they must run the utility as administrator, they will complain about your utility not working.

Mike
Mike in OZ - Author of TS-Tools & Route-Riter.
http://www.agenetools.com
I'm not arguing (just explaining why I'm right).
Locked

Return to “[RW] General RW Discussion”