Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Low on Memory with RUN
Message
General information
Forum:
Visual FoxPro
Category:
Troubleshooting
Miscellaneous
Thread ID:
00254093
Message ID:
00254120
Views:
14
>VFP6/SP3/MDAC21, WinNT4/SP5
>
>At the command window I type
>
>run "@ping 192.168.200.130 -n 1 -l 128 -f > pingresult.out"
>
>And I see the annoying black command window box and a file gets written. I'd like to get rid of that file, first of all.
>

You might look at using my API_APPRUN class rather than RUN - it uses an API call to run an executable; it'll let you run an executable hidden or minimized so that the DOS box is never seen.

AFA the file, if you need to get the results of PING back to your application, you need a file as the communications mechanism, but there are plenty of ways to get around using a DOS executable to ping an IP address, starting with things in Rick Strahl's wwIPStuff class, which you can download here on UT or from his web site, www.west-wind.com

>
>If I type this at the command window
>
>run /n 2 "ping 192.168.200.130 -n 1 -l 128 -f > pingresult.out"
>
>VFP says "RUN/! command failed". Getting help leads me to believe I don't have enough memory or something. I have 128mb of RAM and 256mb of swap space.
>

No, the /N command line option will only allow a WinApp to run, and the ping command line executable is essentially a DOSApp.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform