locked
exe run bat RRS feed

  • Question

  • I would like to make test.exe vithe FoxPro 8 that will run extern test.bat
    can you help
    I am new at this
    Tuesday, 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.

     

    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 Snippet

    RUN '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 Snippet

    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 )



    WFTV.bat has:

    Code Snippet

    start "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?

    Friday, June 13, 2008 5:27 PM

All replies

  • use the run command

     

    RUN c:\test2.bat

     

     

     

    Tuesday, 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~VFP9RuntimeFiles

    Thursday, 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:

    1. gdiplus.dll
    2. msvcr70.dll
    3. VFP8R.DLL
    4. VFP8T.DLL
    5. 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.

     

    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 Snippet

    RUN '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 Snippet

    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 )



    WFTV.bat has:

    Code Snippet

    start "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?

    Friday, June 13, 2008 5:27 PM