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:

$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:

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 fact I have a bet...that this would be a piece of 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:

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...