I should have used a more accurate subject - it's not the CMD-window title, it's the external process title that I want to change.
Win32 API GetWindowText is ReadOnly. SetWindowText has this restriction - If the target window is owned by the current process, SetWindowText causes a <http://msdn.microsoft.com/en-us/library/ms632644(VS.85).aspx> WM_SETTEXT message to be sent to the specified window or control. If the control is a list box control created with the WS_CAPTION style, however, SetWindowText sets the text for the control, not for the list box entries. To set the text of a control in another process, send the <http://msdn.microsoft.com/en-us/library/ms632644(VS.85).aspx> WM_SETTEXT message directly instead of calling SetWindowText. Michael, TaskManager is a mystery to me (except for using the thing, though I find SysInternals ProcessExplorer more useful). I'm not sure that the titlebar colour or background colour would be informative enough - or whether I have access to those for the process. I can of course track by handles within my .NET calling app, for the numerous separately-invoked instances of the external process- but it is the visual text that is needed. _____ Ian Thomas Victoria Park, Western Australia _____ From: ozdotnet-boun...@ozdotnet.com [mailto:ozdotnet-boun...@ozdotnet.com] On Behalf Of Michael O'Dea-Jones Sent: Tuesday, November 30, 2010 7:59 AM To: ozDotNet Subject: RE: Setting CMD-window title Hi Ian, I'm interested too. However what I want is to change the description that appears in Task Manager as I have a number of Processes with the same name e.g. pluginloader.exe. As a work around I have added the "Command Line Column" to Task Manager which allows me to differentiate between the processes because it shows the Command Line Arguments e.g. pluginloader.exe 1 logger. If you can't change the path, then maybe you can change the Command Window Background Colour? Regards, Michael O'Dea-Jones