Group Abstract Group Abstract

Message Boards Message Boards

2
|
18K Views
|
16 Replies
|
7 Total Likes
View groups...
Share
Share this post:

RunProcess issues

Posted 10 years ago
POSTED BY: Tiago Castro
16 Replies
In[2]:= FileExistsQ["C:\\windows\\system32\\netstat.exe"]
Out[2]= True

In[3]:= FileExistsQ[FileNameJoin[{"C:", "windows", "system32", "netstat.exe"}]]
Out[3]= True
POSTED BY: Udo Krause
Posted 10 years ago

What is the output of FileExistsQ["C:\Windows\system32\netstat.exe"] for your system? I expect it to return true if the file exists.

POSTED BY: Updating Name

Here it does not

enter image description here

... possibly the problem is the account owner name bärbel (has an umlaut) or something like that.

By the way, the Enviroment works

enter image description here

Thank you for checking it again, Rolf.

POSTED BY: Udo Krause

Works, kind of, for me:

StringReplace[#, "\r\n" -> "\n"] &@
 ("StandardError" /. RunProcess[{"netstat", "-h"}])
POSTED BY: Rolf Mertig

RunProcess is a fun function!

now it stopped working

In[1]:= $Version
Out[1]= "10.3.1 for Microsoft Windows (64-bit) (December 9, 2015)"

In[2]:= RunProcess[{"C:\\windows\\system32\\netstat.exe", "-h"}]
During evaluation of In[2]:= RunProcess::pnfd: Program C:\windows\system32\netstat.exe not found.  Check Environment["PATH"]. >>

Out[2]= $Failed

on windows 10

enter image description here

RunProcess[] does also not work under Windows 10 in Mathematica 10.2.0

POSTED BY: Udo Krause
Posted 10 years ago

Hi all, Can you help me? I need to call a FORTRAN program recursively to my notebook. Do you have any suggestions on how to do that aside RunProcess?

Cheers, -T.C.

POSTED BY: Tiago Castro
 RunProcess[{"ping","-c2","duckduckgo.com"}]

works fine on Linux.

RunProcess is a fun function!

POSTED BY: Rolf Mertig
Posted 10 years ago

It doesn't run forever for me (Windows 7, Mathematica 10.1):

<|"ExitCode" -> 0, "StandardOutput" -> "

  Pinging www.google.com [74.125.239.112] with 32 bytes of data:

  Reply from 74.125.239.112: bytes=32 time=26ms TTL=46

  Reply from 74.125.239.112: bytes=32 time=6ms TTL=46

  Reply from 74.125.239.112: bytes=32 time=4ms TTL=46

  Reply from 74.125.239.112: bytes=32 time=31ms TTL=46



  Ping statistics for 74.125.239.112:

      Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

  Approximate round trip times in milli-seconds:

      Minimum = 4ms, Maximum = 31ms, Average = 16ms

  ", "StandardError" -> ""|>
POSTED BY: Jim Baldwin
POSTED BY: Marina Shchitova
Posted 10 years ago

www.google.com is an argument to ping so according to the online documentation you'd need the following:

RunProcess[{"ping", "www.google.com"}]
POSTED BY: Jim Baldwin

Is RunProcess something like running system commands from terminal on Mac ? If yes - why

RunProcess["ping www.google.com"]

won't run ?

POSTED BY: Marina Shchitova
Posted 10 years ago

Thank you, let's see what they get. If working properly RunProcess is awesome.

POSTED BY: Tiago Castro

Thank you. I have learned that the issue is under active investigation. I added a note to the bug report about testing with the notebook you sent.

POSTED BY: Daniel Lichtblau
Posted 10 years ago

Hello Daniel, thank you for replying. I attached a simple notebook that reproduce the problem. It's even worst than I first said, because now I see that help stops working too.

Cheers, -T.C.

Attachments:
POSTED BY: Tiago Castro

Do you have a specific set of examples that will replicate the problem?

POSTED BY: Daniel Lichtblau
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard