<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Redirection is all handled by in Intel® Fortran Compiler</title>
    <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028718#M109995</link>
    <description>&lt;P&gt;Redirection is all handled by the command shell. As for pipes, unless you've already redirected standard input/output to pipes, EXECUTE_COMMAND_LINE isn't going to do it for you. Modifying environment? Nope. All commands happen in a separate process, so any environment changes get thrown away when the process exits.&lt;/P&gt;

&lt;P&gt;Basically, on Windows we use CreateProcess to do a "cmd.exe /C your-command" and, if requested, wait for the process to finish. CreateProcess is told to hide any window created (but if you run a program that creates its own window, that is displayed.) A complication I wasn't aware of until I got well into this is that, despite the CreateProcess documentation saying you should specify "cmd.exe" as the application name, that doesn't work. Instead you have to translate the COMSPEC environment variable to get the full path to the command shell processor.&lt;/P&gt;

&lt;P&gt;On Linux and OS X it just calls the C "system" function, with a trailing &amp;amp; if not asked to wait. Much simpler, but you always get a console window, unless you're running from one, which on those platforms is 99.9% of the time.&lt;/P&gt;

&lt;P&gt;The nice thing about EXECUTE_COMMAND_LINE is that it gives you the choice of waiting or not and getting the exit status. Not to mention that it's standard Fortran.&lt;/P&gt;</description>
    <pubDate>Sun, 01 Jun 2014 01:02:25 GMT</pubDate>
    <dc:creator>Steven_L_Intel1</dc:creator>
    <dc:date>2014-06-01T01:02:25Z</dc:date>
    <item>
      <title>How to run *.exe file from fortran</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028711#M109988</link>
      <description>&lt;P&gt;Dear all,&lt;/P&gt;

&lt;P&gt;Now I have a file with extension *.exe has been created using matlab, and I would like to know how I can&amp;nbsp;run it from my fortran code.&lt;/P&gt;

&lt;P&gt;Regards&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 30 May 2014 02:07:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028711#M109988</guid>
      <dc:creator>Reda_A_</dc:creator>
      <dc:date>2014-05-30T02:07:50Z</dc:date>
    </item>
    <item>
      <title>The standard way, introduced</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028712#M109989</link>
      <description>&lt;P&gt;The standard way, introduced with Fortran 2008. is&lt;/P&gt;

&lt;P&gt;[fortran]&lt;/P&gt;

&lt;P&gt;Call Execute_Command_Line ( Command, Wait, Exitstat, Cmdstat, Cmdmsg )&lt;/P&gt;

&lt;P&gt;[/fortran]&lt;/P&gt;

&lt;P&gt;Hope this helps.&lt;/P&gt;</description>
      <pubDate>Fri, 30 May 2014 02:42:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028712#M109989</guid>
      <dc:creator>Craig_Dedo</dc:creator>
      <dc:date>2014-05-30T02:42:18Z</dc:date>
    </item>
    <item>
      <title>Try the Windows</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028713#M109990</link>
      <description>&lt;P&gt;Try the Windows ShellExecuteEx command, or the Quickwin SYSTEMQQ command.&lt;/P&gt;</description>
      <pubDate>Fri, 30 May 2014 07:04:35 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028713#M109990</guid>
      <dc:creator>Anthony_Richards</dc:creator>
      <dc:date>2014-05-30T07:04:35Z</dc:date>
    </item>
    <item>
      <title>ShellExecute is the way I</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028714#M109991</link>
      <description>&lt;P&gt;ShellExecute is the way I would recommend. See&amp;nbsp;&lt;A href="http://software.intel.com/en-us/forums/topic/275071#comment-1548439"&gt;Win32 Corner - ShellExecute&amp;nbsp;&lt;/A&gt; Intel Fortran does not yet support EXECUTE_COMMAND_LINE.&lt;/P&gt;</description>
      <pubDate>Fri, 30 May 2014 13:08:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028714#M109991</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2014-05-30T13:08:18Z</dc:date>
    </item>
    <item>
      <title>Quote:Steve Lionel (Intel)</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028715#M109992</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Steve Lionel (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;ShellExecute is the way I would recommend. See&amp;nbsp;&lt;A href="http://software.intel.com/en-us/forums/topic/275071#comment-1548439"&gt;Win32 Corner - ShellExecute&amp;nbsp;&lt;/A&gt; Intel Fortran does not yet support EXECUTE_COMMAND_LINE.&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Thanks for letting us know that IVF does not yet support Execute_Command_Line.&amp;nbsp; It was late two nights ago when I answered and I did not want to take the time to find out whether or not it had been implemented.&lt;/P&gt;

&lt;P&gt;That said, it is very unfortunate that IVF does not support Execute_Command_Line.&amp;nbsp; Every OS on the market now has a non-standard way of providing this functionality.&amp;nbsp; It seems to me that implementing Execute_Command_Line would be a fairly easy and low-cost feature to implement.&lt;/P&gt;</description>
      <pubDate>Sat, 31 May 2014 12:33:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028715#M109992</guid>
      <dc:creator>Craig_Dedo</dc:creator>
      <dc:date>2014-05-31T12:33:57Z</dc:date>
    </item>
    <item>
      <title>I did say "yet". As it</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028716#M109993</link>
      <description>&lt;P&gt;I did say "yet". As it happens, I've spent the past couple of weeks working on an implementation of EXECUTE_COMMAND_LINE. The trivial implementation just calling "system" is easy, sure, but Windows users wouldn't like a console window popping up all the time, which is what you get that way. To implement this in a more suitable fashion was somewhat more complex, but it's done. It will probably appear in the 15.0 compiler. (I say "probably" because the integration isn't done yet. But we're working on it.)&lt;/P&gt;</description>
      <pubDate>Sat, 31 May 2014 16:00:23 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028716#M109993</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2014-05-31T16:00:23Z</dc:date>
    </item>
    <item>
      <title>Yea, there are some tricky</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028717#M109994</link>
      <description>&lt;P&gt;Yea, there are some tricky nuances such as how to handle pipe, redirect in, redirect out, and modifying environment and/or current directory and/or current drive. This is not an easy job, especially with different opinions as to what is the proper way of doing this. You have my sympathy.&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;</description>
      <pubDate>Sat, 31 May 2014 19:14:49 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028717#M109994</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2014-05-31T19:14:49Z</dc:date>
    </item>
    <item>
      <title>Redirection is all handled by</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028718#M109995</link>
      <description>&lt;P&gt;Redirection is all handled by the command shell. As for pipes, unless you've already redirected standard input/output to pipes, EXECUTE_COMMAND_LINE isn't going to do it for you. Modifying environment? Nope. All commands happen in a separate process, so any environment changes get thrown away when the process exits.&lt;/P&gt;

&lt;P&gt;Basically, on Windows we use CreateProcess to do a "cmd.exe /C your-command" and, if requested, wait for the process to finish. CreateProcess is told to hide any window created (but if you run a program that creates its own window, that is displayed.) A complication I wasn't aware of until I got well into this is that, despite the CreateProcess documentation saying you should specify "cmd.exe" as the application name, that doesn't work. Instead you have to translate the COMSPEC environment variable to get the full path to the command shell processor.&lt;/P&gt;

&lt;P&gt;On Linux and OS X it just calls the C "system" function, with a trailing &amp;amp; if not asked to wait. Much simpler, but you always get a console window, unless you're running from one, which on those platforms is 99.9% of the time.&lt;/P&gt;

&lt;P&gt;The nice thing about EXECUTE_COMMAND_LINE is that it gives you the choice of waiting or not and getting the exit status. Not to mention that it's standard Fortran.&lt;/P&gt;</description>
      <pubDate>Sun, 01 Jun 2014 01:02:25 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028718#M109995</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2014-06-01T01:02:25Z</dc:date>
    </item>
    <item>
      <title>Thanks all for your kindly</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028719#M109996</link>
      <description>&lt;P&gt;Thanks all for your kindly replies,&lt;/P&gt;

&lt;P&gt;Steve, I would like to ask you a question,&lt;/P&gt;

&lt;P&gt;How I can let FORTRAN read&amp;nbsp;my file path without&amp;nbsp;add it every time step&amp;nbsp;by hand using &lt;A href="http://software.intel.com/en-us/forums/topic/275071#comment-1548439"&gt;&lt;U&gt;&lt;FONT color="#0066cc"&gt;Win32 Corner - ShellExecute&amp;nbsp;&lt;/FONT&gt;&lt;/U&gt;&lt;/A&gt;.&lt;/P&gt;

&lt;P&gt;Regards&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2014 09:32:18 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028719#M109996</guid>
      <dc:creator>Reda_A_</dc:creator>
      <dc:date>2014-06-02T09:32:18Z</dc:date>
    </item>
    <item>
      <title>Steve,</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028720#M109997</link>
      <description>&lt;P&gt;Steve,&lt;/P&gt;

&lt;P&gt;&amp;gt;&amp;gt;Instead you have to translate the COMSPEC environment variable to get the full path to the command shell processor.&lt;/P&gt;

&lt;P&gt;FWIW On Windows you also have the start program/command. Try running&lt;/P&gt;

&lt;P&gt;"START your command"&lt;/P&gt;

&lt;P&gt;Type "START /?" for syntax.&lt;/P&gt;

&lt;P&gt;START /MIN /WAIT FooBar arg arg&lt;/P&gt;

&lt;P&gt;Or for something completely different&lt;/P&gt;

&lt;P&gt;del xxx.lst (pre-delete a junk file name that you pick)&lt;/P&gt;

&lt;P&gt;dir xxx.lst (confirm file not present)&lt;/P&gt;

&lt;P&gt;start /min cmd /c dir&amp;gt;xxx.lst&lt;/P&gt;

&lt;P&gt;Note that this appears to do nothing&lt;/P&gt;

&lt;P&gt;dir xxx.lst (should show file xxx.lst, which if TYPE'd shows directory listing produced by prior command)&lt;/P&gt;

&lt;P&gt;When you see the options available to START, you might find some&amp;nbsp;them useful.&lt;/P&gt;

&lt;PRE class="brush:plain;"&gt;Starts a separate window to run a specified program or command.

START ["title"] [/D path]  [/MIN] [/MAX] [/SEPARATE | /SHARED]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [/LOW | /NORMAL | /HIGH | /REALTIME | /ABOVENORMAL | /BELOWNORMAL]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [/NODE &amp;lt;NUMA node&amp;gt;] [/AFFINITY &amp;lt;hex affinity mask&amp;gt;] [/WAIT] 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [command/program] [parameters]

&amp;nbsp;&amp;nbsp;&amp;nbsp; "title"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Title to display in window title bar.
&amp;nbsp;&amp;nbsp;&amp;nbsp; path&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Starting directory.
&amp;nbsp;&amp;nbsp;&amp;nbsp; B&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Start application without creating a new window. The
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; application has ^C handling ignored. Unless the application
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; enables ^C processing, ^Break is the only way to interrupt
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; the application.
&amp;nbsp;&amp;nbsp;&amp;nbsp; I&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The new environment will be the original environment passed
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; to the cmd.exe and not the current environment.
&amp;nbsp;&amp;nbsp;&amp;nbsp; MIN&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Start window minimized.
&amp;nbsp;&amp;nbsp;&amp;nbsp; MAX&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Start window maximized.
&amp;nbsp;&amp;nbsp;&amp;nbsp; SEPARATE&amp;nbsp;&amp;nbsp;&amp;nbsp; Start 16-bit Windows program in separate memory space.
&amp;nbsp;&amp;nbsp;&amp;nbsp; SHARED&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Start 16-bit Windows program in shared memory space.
&amp;nbsp;&amp;nbsp;&amp;nbsp; LOW&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Start application in the IDLE priority class.
&amp;nbsp;&amp;nbsp;&amp;nbsp; NORMAL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Start application in the NORMAL priority class.
&amp;nbsp;&amp;nbsp;&amp;nbsp; HIGH&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Start application in the HIGH priority class.
&amp;nbsp;&amp;nbsp;&amp;nbsp; REALTIME&amp;nbsp;&amp;nbsp;&amp;nbsp; Start application in the REALTIME priority class.
&amp;nbsp;&amp;nbsp;&amp;nbsp; ABOVENORMAL Start application in the ABOVENORMAL priority class.
&amp;nbsp;&amp;nbsp;&amp;nbsp; BELOWNORMAL Start application in the BELOWNORMAL priority class.
&amp;nbsp;&amp;nbsp;&amp;nbsp; NODE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Specifies the preferred Non-Uniform Memory Architecture (NUMA)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; node as a decimal integer.
&amp;nbsp;&amp;nbsp;&amp;nbsp; AFFINITY&amp;nbsp;&amp;nbsp;&amp;nbsp; Specifies the processor affinity mask as a hexadecimal number.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The process is restricted to running on these processors.

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The affinity mask is interpreted differently when /AFFINITY and
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; /NODE are combined.&amp;nbsp; Specify the affinity mask as if the NUMA
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; node's processor mask is right shifted to begin at bit zero.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The process is restricted to running on those processors in
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; common between the specified affinity mask and the NUMA node.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If no processors are in common, the process is restricted to
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; running on the specified NUMA node.&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; WAIT&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Start application and wait for it to terminate.
&amp;nbsp;&amp;nbsp;&amp;nbsp; command/program
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If it is an internal cmd command or a batch file then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; the command processor is run with the /K switch to cmd.exe.
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; This means that the window will remain after the command
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; has been run.

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If it is not an internal cmd command or batch file then
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; it is a program and will run as either a windowed application
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; or a console application.

&amp;nbsp;&amp;nbsp;&amp;nbsp; parameters&amp;nbsp; These are the parameters passed to the command/program.

NOTE: The SEPARATE and SHARED options are not supported on 64-bit platforms.

Specifying /NODE allows processes to be created in a way that leverages memory
locality on NUMA systems.&amp;nbsp; For example, two processes that communicate with
each other heavily through shared memory can be created to share the same
preferred NUMA node in order to minimize memory latencies.&amp;nbsp; They allocate
memory from the same NUMA node when possible, and they are free to run on
processors outside the specified node.

&amp;nbsp;&amp;nbsp;&amp;nbsp; start /NODE 1 application1.exe
&amp;nbsp;&amp;nbsp;&amp;nbsp; start /NODE 1 application2.exe

These two processes can be further constrained to run on specific processors
within the same NUMA node.&amp;nbsp; In the following example, application1 runs on the
low-order two processors of the node, while application2 runs on the next two
processors of the node.&amp;nbsp; This example assumes the specified node has at least
four logical processors.&amp;nbsp; Note that the node number can be changed to any valid
node number for that computer without having to change the affinity mask.

&amp;nbsp;&amp;nbsp;&amp;nbsp; start /NODE 1 /AFFINITY 0x3 application1.exe
&amp;nbsp;&amp;nbsp;&amp;nbsp; start /NODE 1 /AFFINITY 0xc application2.exe

If Command Extensions are enabled, external command invocation
through the command line or the START command changes as follows:

non-executable files may be invoked through their file association just
&amp;nbsp;&amp;nbsp;&amp;nbsp; by typing the name of the file as a command.&amp;nbsp; (e.g.&amp;nbsp; WORD.DOC would
&amp;nbsp;&amp;nbsp;&amp;nbsp; launch the application associated with the .DOC file extension).
&amp;nbsp;&amp;nbsp;&amp;nbsp; See the ASSOC and FTYPE commands for how to create these
&amp;nbsp;&amp;nbsp;&amp;nbsp; associations from within a command script.

When executing an application that is a 32-bit GUI application, CMD.EXE
&amp;nbsp;&amp;nbsp;&amp;nbsp; does not wait for the application to terminate before returning to
&amp;nbsp;&amp;nbsp;&amp;nbsp; the command prompt.&amp;nbsp; This new behavior does NOT occur if executing
&amp;nbsp;&amp;nbsp;&amp;nbsp; within a command script.

When executing a command line whose first token is the string "CMD "
&amp;nbsp;&amp;nbsp;&amp;nbsp; without an extension or path qualifier, then "CMD" is replaced with
&amp;nbsp;&amp;nbsp;&amp;nbsp; the value of the COMSPEC variable.&amp;nbsp; This prevents picking up CMD.EXE
&amp;nbsp;&amp;nbsp;&amp;nbsp; from the current directory.

When executing a command line whose first token does NOT contain an
&amp;nbsp;&amp;nbsp;&amp;nbsp; extension, then CMD.EXE uses the value of the PATHEXT
&amp;nbsp;&amp;nbsp;&amp;nbsp; environment variable to determine which extensions to look for
&amp;nbsp;&amp;nbsp;&amp;nbsp; and in what order.&amp;nbsp; The default value for the PATHEXT variable
&amp;nbsp;&amp;nbsp;&amp;nbsp; is:

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; .COM;.EXE;.BAT;.CMD

&amp;nbsp;&amp;nbsp;&amp;nbsp; Notice the syntax is the same as the PATH variable, with
&amp;nbsp;&amp;nbsp;&amp;nbsp; semicolons separating the different elements.

When searching for an executable, if there is no match on any extension,
then looks to see if the name matches a directory name.&amp;nbsp; If it does, the
START command launches the Explorer on that path.&amp;nbsp; If done from the
command line, it is the equivalent to doing a CD /D to that path.
&lt;/PRE&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2014 12:26:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028720#M109997</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2014-06-02T12:26:48Z</dc:date>
    </item>
    <item>
      <title>START is a shell command, so</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028721#M109998</link>
      <description>&lt;P&gt;START is a shell command, so you can't run it directly with CreateProcess, and then you run into the same issue with locating cmd.exe. Or were you suggesting using START with a call to system? I think that by the time you get to the START command, it's too late to suppress the window.&lt;/P&gt;

&lt;P&gt;Reda, I don't understand your question. I don't see any mention of file path in the discussion of ShellExecute.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2014 14:33:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028721#M109998</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2014-06-02T14:33:00Z</dc:date>
    </item>
    <item>
      <title>I made a test program using</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028722#M109999</link>
      <description>&lt;P&gt;I made a test program using SYSTEMQQ. This seems to work (somewhat).&amp;nbsp;It has an issue with &amp;gt;&lt;/P&gt;

&lt;P&gt;The program runs systemqq("start cmd.exe /c dir &amp;gt; xxx.lst"), xxx.lst is created, but has length of 0. So the console output is not being redirected.&lt;/P&gt;

&lt;P&gt;Jim Dempsey&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2014 15:36:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028722#M109999</guid>
      <dc:creator>jimdempseyatthecove</dc:creator>
      <dc:date>2014-06-02T15:36:01Z</dc:date>
    </item>
    <item>
      <title>I already tested redirection</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028723#M110000</link>
      <description>&lt;P&gt;I already tested redirection of dir in the new implementation and it works. I don't see any need to change it at this point.&lt;/P&gt;</description>
      <pubDate>Mon, 02 Jun 2014 15:39:11 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028723#M110000</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2014-06-02T15:39:11Z</dc:date>
    </item>
    <item>
      <title>When I looked this issue up</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028724#M110001</link>
      <description>&lt;P&gt;When I looked this issue up in the Fortran Help a few months ago, I found the following built-in relevant procedures:&lt;/P&gt;

&lt;P&gt;SYSTEM, SYSTEMQQ, RUN, RUNQQ&lt;/P&gt;

&lt;P&gt;Descriptions of these were not very clear or distinguished, but I do recall that (a) the QQ versions could be used to run a .exe program while the others were just for a command-line routine (whatever that means?), and (b) all of them would wait on for the routine to complete before returning control to your program.&lt;/P&gt;

&lt;P&gt;I didn't do thorough testing on these, so can't say I really understand them. I did however run into the following peculiarity. The program I wanted to run was Textpad.exe, and it resided in 'c:\program files'. The space in the folder name 'program files' caused&amp;nbsp;trouble with SYSTEMQQ: it produced the error "cannot find folder 'c:\program' ". But RUNQQ handled it OK. So that's the routine I have used ever since.&lt;/P&gt;

&lt;P&gt;Now the discussion above implies that there are one or two other possibilities, yet RUN and RUNQQ have not been included. Am I missing something? Is some reason why RUNQQ was not mentioned?&lt;/P&gt;

&lt;P&gt;The only feature I would like to have that RUNQQ does not offer is for control to be returned to the program while Textpad is still in progress. But if the routine does not deal with the blank in a folder name it would not be acceptable!&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jun 2014 20:30:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028724#M110001</guid>
      <dc:creator>dboggs</dc:creator>
      <dc:date>2014-06-12T20:30:38Z</dc:date>
    </item>
    <item>
      <title>Intel Fortran does not</title>
      <link>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028725#M110002</link>
      <description>&lt;P&gt;Intel Fortran does not support a routine called RUN.&lt;/P&gt;

&lt;P&gt;RUNQQ lets you specify the program and the command arguments separately, SYSTEM and SYSTEMQQ have you supply a command line (including program and arguments) as one argument. SYSTEM and SYSTEMQQ seem to behave identically - SYSTEM exists because it is a common C library name. All wait for command completion. You can use any of them to run a program.&lt;/P&gt;

&lt;P&gt;On Windows, blanks in arguments are bad on the command line too, which is why you have to enclose such arguments in quotes. At least with RUNQQ, the path to the program can contain blanks.&lt;/P&gt;</description>
      <pubDate>Thu, 12 Jun 2014 21:27:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Fortran-Compiler/How-to-run-exe-file-from-fortran/m-p/1028725#M110002</guid>
      <dc:creator>Steven_L_Intel1</dc:creator>
      <dc:date>2014-06-12T21:27:17Z</dc:date>
    </item>
  </channel>
</rss>

