Re: Running a DOS program using Microsoft Command Shell



I did download the Application,
It works for me, I think You used the "wrong" window title so the App does not get activated:

..\smpdbk91.exe
$wsh.AppActivate("Self-Extracting Archive, Rick's Planet Archive Manager");$wsh.SendKeys("{ESC}")

tho be sure it is activated :

if ($wsh.AppActivate("Self-Extracting Archive, Rick's Planet Archive Manager")) {$wsh.SendKeys("{ESC}")} else {"Failed to activate"}

Hope this helps.

greetings /\/\o\/\/

netdawg wrote:
Alex:

Right...faulting the application is actually missing the whole point of this post. The question I am trying to solve this weekend is what is the best way to deal with such a situation using windows scripting. I KNOW applications can be designed better than this. Put things into perspective, this program was probably written in late 80s, early 90s. My guess is 1991. I am trying to get a hold of the author, a retired scientist (he is still alive!). Will look thru documentation, as well, little more carefully this time. But I STILL INSIST that there should some way of controlling this without looking for anything else...in fact I have a bet...that this would be a piece of cake...now I am going to look real dumb!


William: In this program, the ESC key can only be pressed on console, which is TOTALLY maximized i.e. enlarges the CMD/COMMAND to fill the entire screen a la DOS with some old resolution.


If you REALLY would like to accept "Mission Impossible", ... all files needed are available by public FTP:

ftp://ftp.pdc.org/pub/smpdbk/

Run self-extracting file first smpdbk91.exe...the program is "smpdbk.exe" and the input file (redirect) is run.txt. Obviously, this input file is missing the ESC character, since I don'y know how to feed ESC in this fashion. The INPUT.TXT file is actually called WAI.TXT in this FTP.

Please note that:

(1) When run manually (using input params one-by-one in run.txt), the program should work fine.
(2) When using redirect, the program freezes at the last step and need to use Task Manager to kill it (output will only be partially done).
(3) When instructed from shell script, the progam simply ignores all SendKeys.

Hope this helps design something at MSFT or enlighten me on the best way to handle this if it is possible at all...

Thanks!
.



Relevant Pages

  • Re: Running a DOS program using Microsoft Command Shell
    ... needed are available by public FTP: ... and the input file is run.txt. ... missing the ESC character, since I don'y know how to feed ESC in this ... When instructed from shell script, the progam simply ignores all SendKeys. ...
    (microsoft.public.windows.server.scripting)
  • Re: [PATCH] ncurses based config V2
    ... Fixed segfaults in help window. ... Added hot keys support. ... of readability. ... ESC prefix, I don't know). ...
    (Linux-Kernel)
  • Re: Fedora 12 - compiz ruined by updates
    ... Xlib Programming Manual: Window Attributes: Backing Store ... Xnews works quite well in wine. ... Also, for using tar, please try reading the output of ... which unpacks the input file and puts the contents relative to the ...
    (alt.os.linux)
  • Re: date problem
    ... Gabkin wrote in ... > with the 'ESC' highlighted.Interestingly, it also sets the window ... > under rxvt but the title remains my custom title. ...
    (comp.lang.perl.misc)
  • Re: Displaying from email address?
    ... > The best you can do is Ctrl+F3 to see the Message Source. ... only by closing the window (e.g. by pressing Alt-F4 and NOT by Esc) ... Source window which used to bite me too often but still might be seen ... Message Source window was showing pressing Alt-F4 initiated a shutdown ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)