Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Run a windows program from within VFP6 app
Message
From
13/09/2000 11:30:53
 
 
To
13/09/2000 11:25:39
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00415851
Message ID:
00415856
Views:
24
>I want to "shell" out of a vfp6 app to run another windows based program. I know the "RUN" command supposedly will do this but it only seems to like DOS based path/command strings. Most of my directories (and others as well) often have names that are longer than 8 characters. Therefore, I can't get the RUN command to work if the target .exe has fullpath that is not DOS compliant.
>
>Is there some newer/other function I should be using instead of RUN. If I should use the RUN command is the correct syntax to put the complete target/path in a variable (i.e. cexe) and then use the "&" function (for example RUN &cexe)? Also, what is the "!" do in the RUN command?

Surround the pathing information in quotes.

lcRunCommand = 'RUN "C:\Program files\MyDir\MyProg.exe"'
&lcRunCommand.
Craig Berntson
MCSD, Microsoft .Net MVP, Grape City Community Influencer
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform