TIP: Click on subject to list as thread! ANSI
echo: delphi
to: BRYAN SMITH
from: TOMMY USHER
date: 1996-07-12 08:02:00
subject: RUN A DOS BAT FILE.

BS>Can't say - I'm keeping Win95 off my own PC for as long as I can .
BS>However, I may have a possibility to test WinExecAndWait on a Windows NT
BS>network server (i.e. running right on the server PC itself).  Would that
BS>answer the question ?
In theory, it should answer it, as the issue seems to be WIN32 based.  I
know when I was working with Windows 3.1, several pointed out that WIN32
had just the features I needed to control spawned programs in a simple
manner, but that they were missing from WIN32s.
BS>W32 may be changed, but I would have thought they would provide SOME way 
n
BS>the Win32-API to determine if a particular task was still active.  Or does
BS>multi-threading (or whatever the concept is called) make that impossible ?
Actually, it does provide this, and it is *supposed* to be simpler.  It
really isn't.
BS>An alternative might be to run the batch file in a non-maximized window,
BS>using WinExec, and to have the main task post a MessageDlg asking the user
BS>to press OK when the batch file completes (or when the MS-DOS icon 
vanishes,
BS>if we run minimized).  Yuck.
Nope, that's not necessary.  I just took a lazy approach, and used a
component that was low-cost shareware ($15) rather than trying to figure
out the example in a book.  The "simple" method of doing this in WIN32
is anything but simple.
BS>All of which raises an interesting question.  Is there any way that a 
Delphi
BS>1.0 program can determine whether it is running under Win 3.1 or Win95 ?  
In
BS>other words, does WinAPI's GetVersion still work in Win32, and if so, what
BS>version number does it return for Win95 ?
I think it works, as I seem to recall a discussion of this on a local
board.  I believe it returns something like version 4.0, or 4.095...
I seem to recall that there are some conflicts between various methods
of checking the version, and some return the wrong results.
---
 * QMPro 1.52 * Real Klingons do NOT eat Gagh quiche!!!
--- WILDMAIL!/WC v4.12 
---------------
* Origin: GC-BBS! (1:226/810.0)

SOURCE: echomail via exec-pc

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.