Answered by:
exe run bat

Question
-
I would like to make test.exe vithe FoxPro 8 that will run extern test.bat
can you help
I am new at thisTuesday, June 10, 2008 11:36 AM
Answers
-
If you are running a FoxPro EXE you need the runtimes. It has nothing to do with it calling a BAT file. To run a FoxPro app you need the runtimes installed.
- Proposed as answer by Ed Price - MSFTMicrosoft employee Wednesday, June 20, 2012 1:45 AM
- Marked as answer by Ed Price - MSFTMicrosoft employee Friday, June 29, 2012 11:15 PM
Thursday, June 12, 2008 11:03 AM -
I give up.
I have don't have *.bat any more. All I have is a line:
Code SnippetRUN 'C:\WINDOWS\system32\cmd.exe /c start "Title" /AboveNormal C:\WINDOWS\notepad.exe'
When I run it I get a message:
No PARAMETER statement is found.
And three options:
Cancal Ignore Help
If I press Cancel it closes.
If I press Ignore starts the program (just what I want!) - can I make it go around this?
If I press Help nothing hepens. I assume because I don't have FoxPro on that comp.
If I go with:
Code SnippetDECLARE 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 )
WFTV.bat has:
Code Snippetstart "title" /AboveNormal "C:\WINDOWS\notepad.exe"
Same thing hapens only that when I click Ignore another error occurs:
File 'shellexecute.prg' does not exist.
No matter what I click here (Cancel or Ignore) it closes.
All I would like to do is to make an *.exe that would start notepad in 'AboveNormal' priority.
Any ideas, PLEASE?
- Proposed as answer by Ed Price - MSFTMicrosoft employee Wednesday, June 20, 2012 1:45 AM
- Marked as answer by Ed Price - MSFTMicrosoft employee Friday, June 29, 2012 11:15 PM
Friday, June 13, 2008 5:27 PM
All replies
-
use the run command
RUN
c:\test2.batTuesday, June 10, 2008 1:48 PM -
The cleaner syntax is using the Windows API instead of directly shelling to DOS (and seeing the ugly DOS screen)
DECLARE INTEGER ShellExecute ; IN SHELL32.DLL ; INTEGER nWinHandle,; STRING cOperation,; STRING cFileName,; STRING cParameters,; STRING cDirectory,; INTEGER nShowWindow ShellExecute( 0, "Open", "test.bat", "", "", 1 )
Tuesday, June 10, 2008 2:22 PM -
Thank you, but I have a problem.
It works OK on comp that I have FoxPro, but I need it on second and that is whare I get that "MSVCR70.dll" is missing. When I provide that I get "Cannot locate the Microsoft Visual FoxPro support library." How can I fix it. Please don't tell me to install there FoxPro. I is not an option.
For any help I would be thankful!Thursday, June 12, 2008 5:30 AM -
You need to provide foxpro runtime files on that system.
Take a look at this link for files that you need :
http://fox.wikis.com/wc.dll?Wiki~VFP9RuntimeFilesThursday, June 12, 2008 6:00 AM -
You need to copy RunTime files to your root folder from where software running. Following files at least require running VFP compiled EXE:
- gdiplus.dll
- msvcr70.dll
- VFP8R.DLL
- VFP8T.DLL
- VFP8RENU.DLL
These files come with VFP Setup or you may download RunTime Setup from internet.
Thursday, June 12, 2008 6:38 AM -
do I need to
since it's a batch file, really call the command-interpreter.
Code Snippet<COMSPEC> /C EXTERN.BAT
Thursday, June 12, 2008 6:42 AM -
If you are running a FoxPro EXE you need the runtimes. It has nothing to do with it calling a BAT file. To run a FoxPro app you need the runtimes installed.
- Proposed as answer by Ed Price - MSFTMicrosoft employee Wednesday, June 20, 2012 1:45 AM
- Marked as answer by Ed Price - MSFTMicrosoft employee Friday, June 29, 2012 11:15 PM
Thursday, June 12, 2008 11:03 AM -
I give up.
I have don't have *.bat any more. All I have is a line:
Code SnippetRUN 'C:\WINDOWS\system32\cmd.exe /c start "Title" /AboveNormal C:\WINDOWS\notepad.exe'
When I run it I get a message:
No PARAMETER statement is found.
And three options:
Cancal Ignore Help
If I press Cancel it closes.
If I press Ignore starts the program (just what I want!) - can I make it go around this?
If I press Help nothing hepens. I assume because I don't have FoxPro on that comp.
If I go with:
Code SnippetDECLARE 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 )
WFTV.bat has:
Code Snippetstart "title" /AboveNormal "C:\WINDOWS\notepad.exe"
Same thing hapens only that when I click Ignore another error occurs:
File 'shellexecute.prg' does not exist.
No matter what I click here (Cancel or Ignore) it closes.
All I would like to do is to make an *.exe that would start notepad in 'AboveNormal' priority.
Any ideas, PLEASE?
- Proposed as answer by Ed Price - MSFTMicrosoft employee Wednesday, June 20, 2012 1:45 AM
- Marked as answer by Ed Price - MSFTMicrosoft employee Friday, June 29, 2012 11:15 PM
Friday, June 13, 2008 5:27 PM