MathGroup Archive 1999

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Problem with "Run" command on WindowsNT

  • To: mathgroup at
  • Subject: [mg18570] Re: Problem with "Run" command on WindowsNT
  • From: paulh at (P.J. Hinton)
  • Date: Tue, 13 Jul 1999 01:01:17 -0400
  • Organization: Wolfram Research, Inc.
  • References: <7m6j2o$>
  • Sender: owner-wri-mathgroup at

In article <7m6j2o$2l8 at>, tanguy Risset <Tanguy.Risset at> writes:

> On Mathematica 3.0 on windowsNT, when I type 
> In[1]:= Run["dir"]
> a dos window appear briefly and disapear immediatly
> out[1]:= 0
> Does anyone knows how to suppress the appearance of this windows?
> Is it different in Mathematica 4.0?

Quoting _The Mathematica Book_ (Third Edition), Section 2.11.12:

| It is important to realize that Run never "captures" any of the
| output from an external command. As a result, where this output 
| goes is purely determined by your operating system. Similarly, 
| Run does not supply input to external commands. This means that 
| the commands can get input through any mechanism provided by 
| your operating system.

There is no user-accessible means for suppressing the creation
of the window under Windows 95/98/NT.  The Run[] command works
by calling a lower level Win32 API function for launching child
processes.  The function provides a flag that can be set to suppress 
the creation of console windows, but it is a Windows NT-specific flag.  
It is hardcoded in Mathematica and cannot be changed by the user at 

Going one step backwards, is there a reason you wish to call the 
operating system DIR command?  Perhaps you are not aware that there
are Mathematica functions for obtaining a listing of files in a 
directory.  See the ReferenceGuide entry for the function FileNames[].

P.J. Hinton	
Mathematica Programming Group		paulh at
Wolfram Research, Inc.
Disclaimer: Opinions expressed herein are those of the author alone.

  • Prev by Date: Re: Q: Character encoding with Display[]
  • Next by Date: Re: Concurrent Curve Fitting...
  • Previous by thread: Re: Problem with "Run" command on WindowsNT
  • Next by thread: Not Plotting Vertical Assymptotes