Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Running DOS Commands and Returning Result Codes?
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00080871
Message ID:
00080912
Views:
26
>>>>>>>I need to be able to run a DOS command (in particular the "net use" command) and see any results given by the command. In other words, instead of the results being printed to the screen I need them to be returned to my foxpro program. Any ideas? Hmm...I'm stymied.
>>>>>>
>>>>>>TRY "run net use >somefile"
>>>>>>then examine somefile for the output and you can work with it from there.
>>>>>
>>>>>That was the first thought I had too, but the problem is in NT 3.51 (we are running a citrix server) the output is still printed to the screen.
>>>>
>>>>you could try "run net use >>somefile" or put it in a .bat file and execute that.
>>>
>>>>>somefile will output the results to the file, but it will not surpress the output to the screen. So, I can still see the results of the net use command at the bottom of my screen in the app. Hmm..
>>
>>You mean it flashes briefly?
>>the only thing I can think of is to define a hidden window or something >minimal and run it from there but I have never needed to do this.
>>Let me know if you finally get it to work right.
>
>It doesn't flash briefly, it stays on the screen until I issue a clear. It looks really bad in the app to have the screen blinking, clearing, then redisplaying. Like I said in my other post, I can't get the 'net use' command to surpress output from a DOS prompt, so I don't see how I am going to get it to do so from fox. I would normally use the capture command to capture the printer port I am trying to, but the capture command won't work from within a citrix server. So, I can't use capture, it doesn't look like I can use net use...any other suggestions for capturing a printer port from within FP 2.6?

What the heck is a citrix server, are they like trees in florida?
if you are running win95, you can customize a dos box to run minimized and fool with that, again never done that either.
"Build a man a fire, and he's warm for a day.
Set a man on fire, and he's warm for the rest of his life."
Previous
Reply
Map
View

Click here to load this message in the networking platform