>>>>>Hello,
>>>>>
>>>>>Is there a way to run different programs from within vfp. I have tryed the run command but iit always pops up a dos window before going to the application.
>>>>>
>>>>>Is the following correct?
>>>>>
>>>>>RUN C:\MYAPP.EXE
>>>>>
>>>>That's the native RUN command. If you're using VFP6, you can take a look at the FFC's ShellExecute class, or download my API_APPRUN class from here on UT, which use CreateProces() rather than ShellExecute() as the class basis.
>>>
>>>I used the /N in front of the call to regedit.exe and I don't see the dos window. Maybe its flashing by to quickly to notice. If I place the /n after the call to the exe then I see the dos window.
>>>
>>
>>Which would make sense - coming before the executable to run, it's a flag for the RUN command, after, it'd be a parameter to the executable being launched, right? Otherwise, how could you pass parameters on the RUN command line to the executable that matched keywords or flags available to RUN??
>>
>>>Dan
>
>That's true. I was curious though. Does the dos window flash by with the /N in front?
>
Launching a WinApp, no, but you'd have to launch a VDM when running a DOS App using the /N. Take a look at what /N is doing; it launches a Windows app without waiting. There's no need for a DOS session to be fired. REGEDIT in a WinAPP, not a DOS program.
If you don't specify /N, and no .PIF is found matching a command issued without a file extension, a DOS session is started based on the FOXRUN.PIF, and the command line is run through the DOS command line. This allows you to run a .BAT file where multiple programs are being run; VFP monitors the state of the DOS VDM it watches to recognize when it's finished.
It's right there in the docs. It's just a matter of reading them... ;-)
>Dan