views:

113

answers:

1

Dear ladies and sirs.

I am starting a new instance of a console application from my .NET code using the Process.Start() method. I was wondering if I can specify the title of the console window hosting the spawned process. Could not find anything suitable in ProcessStartInfo.

As a last resort I can P/Invoke to talk to Win32 API directly, but I'd rather not.

Any ideas?

Thanks.

+2  A: 

The easiest way I can think of is to create a batch file that sets the title (using the title command) and then executes the application. Then Start the .bat file instead.

Mattias S
Thanks, interesting. Does it mean that there is no way in .NET?
mark
None that I know of.
Mattias S