[comp.windows.ms.programmer] Need info on batch files under Windows 3.0

dbien@hpuxa.acs.ohio-state.edu (Daniel Bien) (03/22/91)

I have a question about firing up a batch file or a DOS app 
under Windows 3.0

I need to start up a batch file as an icon, but as far as I
can see the PIF will not let you do this.  Does anyone know
of a way to fire off a batch file WITHOUT seeing a window
open on the screen?

Related to this, is it possible to spawn a DOS application 
from within a Windows app?  [enhanced mode of course! :) ]

Any help would be greatly appreciated.

Thanks!

Dan

rpA-Inc@cup.portal.com (RP and Ainc) (03/22/91)

> 
> I need to start up a batch file as an icon, but as far as I
> can see the PIF will not let you do this.  Does anyone know
> of a way to fire off a batch file WITHOUT seeing a window
> open on the screen?
>
To verify if this can be done at all, try making a PIF file, and 
add its name to the "Load=" line in you WIN.INI file. If it comes up 
OK in iconic form, then there's hope...

> Related to this, is it possible to spawn a DOS application 
> from within a Windows app?  [enhanced mode of course! :) ]
> 

Try the WinExec call (documented in SDK Ref. 1). And make sure you 
check its status return.  All hell can break loose if it fails and 
you continue as normal...

Cheers,

Ramin Firoozye'
rp&A Inc.
San Francisco, CA.