Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run a EXe program without the run command - Win9x >

Program Source Code

Run a EXe program without the run command - Win9x >

by  dgrewe  Posted    (Edited  )
[tt]*/***************************************************************************
*/Program : RunExe
*/System : Project Bidding System
*/Purpose : Start a Windows Exe File without the run command
*/Syntax : Success = runExe(ExeName , [Parameter] , [WindowStatus])
*/Returns : Sucess - logical
*/Parameter : ExeName - String - Drive:\Directory\Filename of program to start
*/ : Parameter - String - ExeFile Parameters
*/ : WindowStatus - integer - Type of window to open
*/Defaults : ExeName - Manditory
*/ : Parameter - Optional
*/Requires : Windows 95/98/NT/2000
*/Changes :
*/Calls :
*/Version : 1.0
*/Dated : 08/31/2000
*/Written By: David W. Grewe
*/************************************************************
lparameters pcExeName, pcParameters, pnWindowStat
* first parameter required, other - optional
if Parameters() < 2.5 .or. type("pnWindowStat") != "N" .or. empty(pnWindowStat)
pnWindowStat = 1 && see Win32Api function ShowWindow for values of pnWindowStat
endif
local lcRunString
m.lcRunString = '"'+ allt(m.pcExeName) + '"' + iif(parameters() > 1 , + " " + m.pcParameters , "")
declare integer WinExec in kernel32 string lpCmdLine, integer uCmdShow
return WinExec(m.lcRunString, m.pnWindowStat) > 31
endproc
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top