Windows – How to start a Windows GUI app from telnet

telnetwindows

I have a GUI application running on a windows XP client machine. I would like to telnet in, shut it down, pull some files over via ftp and then start it up again.

It's that last part that I'm having problems with as it seems like starting any GUI app from telnet "starts" it only in the sense that it is added to the process list. It does not pop up forms or really start doing anything (like writing log files).

Try it yourself. Telnet localhost => notepad.exe

Is there a simple way around this limitation? I also have RAdmin installed on all these machines, maybe there's a way to somehow use it? I doubt it since this is for an automation script and my experience is that RAdmin has 0 support for this.

By the way, I started this discussion on stackoverflow and it was recommended to me that you guys might know a thing or two about this.

Best Answer

See http://msdn.microsoft.com/en-us/library/ms687096(VS.85).aspx for a long and detailed though ultimately unhelpful description of what is happening when you launch apps from a telnet session. Many years ago I wrote a telnet server for Windows NT3.50 and I learned all this stuff the hard way :-)

I think you need to look again at what you're trying to do. From your description I'd guess that you have some GUI app being run by a logged in user and you want to kill it so you can do some maintenance then restart it. Killing it is easy as you can just kill the process. Restarting it in any useful way is harder. Could you set the PC to autologin and run the app from the Start Menu? Then you could just restart the PC when you've grabbed your files. I'm somewhat ashamed to admit this is what I did under similar circumstances.

JR