andrejanubis
Programmer
- Jun 10, 2008
- 10
I would like to make test.exe vithe FoxPro 8 that will run extern test.bat
can you help
I am new at this
I thak you for any help
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
DECLARE INTEGER ShellExecute ;
IN SHELL32.DLL ;
INTEGER nWinHandle,;
STRING cOperation,;
STRING cFileName,;
STRING cParameters,;
STRING cDirectory,;
INTEGER nShowWindow
ShellExecute( 0, "Open", "WFTV.bat", "", "", 1 )
RUN 'C:\WINDOWS\system32\cmd.exe /c start "Title" /AboveNormal C:\WINDOWS\notepad.exe'
DECLARE INTEGER ShellExecute IN SHELL32.DLL ;
INTEGER nWinHandle, ;
STRING cAction, ;
STRING cFileName, ;
STRING cParameters, ;
STRING cDirectory, ;
INTEGER nShowWindow
cAction = "Open"
cFileName = "C:\Programs\WFTVFM\WFTV.bat"
ShellExecute( 0, cAction, cFileName, "", "", 2 )
start "title" /AboveNormal "C:\WINDOWS\notepad.exe"
start
start "title" /AboveNormal "C:\WINDOWS\notepad.exe"
start "title" /AboveNormal "C:\WINDOWS\notepad.exe"
start "title" /AboveNormal "C:\WINDOWS\notepad.exe"
DECLARE INTEGER CreateProcess IN kernel32;
STRING lpApplicationName,;
STRING lpCommandLine,;
INTEGER lpProcessAttributes,;
INTEGER lpThreadAttributes,;
INTEGER bInheritHandles,;
INTEGER dwCreationFlags,;
INTEGER lpEnvironment,;
STRING lpCurrentDirectory,;
STRING lpStartupInfo,;
STRING @ lpProcessInformation
cApp = "C:\WINDOWS\notepad.exe"
cStartInfo = long2str(68) + REPLICATE(CHR(0), 64)
cProcInfo = REPLICATE(CHR(0), 16)
= CreateProcess( cApp, NULL, 0, 0, 0, 0, 0, SYS(5)+SYS(2003), @cStartInfo, @cProcInfo )
FUNCTION long2str
PARAMETERS m.longval
PRIVATE i, m.retstr
m.retstr = ""
FOR i = 24 TO 0 STEP -8
m.retstr = CHR(INT(m.longval/(2^i))) + m.retstr
m.longval = MOD(m.longval, (2^i))
NEXT
RETURN m.retstr
DECLARE INTEGER ShellExecute IN SHELL32.DLL ;
INTEGER nWinHandle, ; && handle of the program's parent window, usually set this to 0
STRING cAction, ; && action to be performed
STRING cFileName, ; && file on which the action is to be performed
STRING cParameters, ; && If the file is an executable program, these are the parameters (if any) that are passed to it in the command line
STRING cDirectory, ; && If the file is an executable program, this is the program's default or start-up directory
INTEGER nShowWindow && program's initial window state (1 = normal, 2 = minimized, 3 = maximized)
cAction = "Open"
cFileName = 'C:\WINDOWS\notepad.exe'
ShellExecute( 0, cAction, cFileName, "", "", 2 )
start "title" /AboveNormal