<?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 Re: Launching .exe in python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/861#M112</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Based on the Python help on subprocess, you can (and on Windows, probably should) use a string instead of a list of arguments to specify the command line. Access seems particularly picky about how you specify its command line. This should work:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import subprocess
subprocess.Popen(r'"C:\Program Files\Microsoft Office\Office12\MSACCESS.EXE" "\\vopcc\gis\GISOPS\StreetNetwork\Routing.mdb" /X WSorderMacro')&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note the raw string indicator, single quotes around the entire string, and the double quotes around paths (which are required if the path contains spaces, but it's good to include them anyways).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 10 Dec 2021 20:03:19 GMT</pubDate>
    <dc:creator>LoganPugh</dc:creator>
    <dc:date>2021-12-10T20:03:19Z</dc:date>
    <item>
      <title>Launching .exe in python</title>
      <link>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/849#M100</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am trying to launch microsoft access.exe and have know errors but also no result with opening access. Does anyone know how to do this. I am using ArcDesktop ten with latest service pack and have python 2.6 installed.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import os&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;os.spawn("c:\programs files\Microsoft office\office12\msaccess.exe")&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Dec 2010 19:30:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/849#M100</guid>
      <dc:creator>DanPajak</dc:creator>
      <dc:date>2010-12-28T19:30:26Z</dc:date>
    </item>
    <item>
      <title>Re: Launching .exe in python</title>
      <link>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/850#M101</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Two things:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1 - Backslashes are an &lt;/SPAN&gt;&lt;A href="http://en.wikipedia.org/wiki/Escape_character" rel="nofollow noopener noreferrer" target="_blank"&gt;escape character&lt;/A&gt;&lt;SPAN&gt; in Python. Either escape your backslashes with another backslash, put an "r" at the front of the string (just before the opening quote) to denote that it is a raw string, or replace the backslashes with forward slashes.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2 - Use the &lt;/SPAN&gt;&lt;A href="http://docs.python.org/release/2.6.6/library/subprocess.html" rel="nofollow noopener noreferrer" target="_blank"&gt;subprocess&lt;/A&gt;&lt;SPAN&gt; module instead, as it is intended to replace other methods of executing external programs.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;e.g.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import subprocess
subprocess.Popen([r"c:\programs files\Microsoft office\office12\msaccess.exe"])&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:03:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/850#M101</guid>
      <dc:creator>LoganPugh</dc:creator>
      <dc:date>2021-12-10T20:03:11Z</dc:date>
    </item>
    <item>
      <title>Re: Launching .exe in python</title>
      <link>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/851#M102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I used the code as in your example and still I get nothing to launch.&amp;nbsp;&amp;nbsp; Is there anything at the begining or ending of the python script that I could be missing for this not to work.&amp;nbsp;&amp;nbsp; This is a simple command and works if I put it in command line but nothing in python.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Dec 2010 11:52:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/851#M102</guid>
      <dc:creator>DanPajak</dc:creator>
      <dc:date>2010-12-29T11:52:08Z</dc:date>
    </item>
    <item>
      <title>Re: Launching .exe in python</title>
      <link>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/852#M103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Check the path, I simply copied yours and I see a typo in what should be "program files". Using my own path to MSACCESS.exe works for me. It should be throwing an error if it can't find the file though.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Dec 2010 16:40:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/852#M103</guid>
      <dc:creator>LoganPugh</dc:creator>
      <dc:date>2010-12-29T16:40:50Z</dc:date>
    </item>
    <item>
      <title>Re: Launching .exe in python</title>
      <link>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/853#M104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I corrected the typo and still get nothing.&amp;nbsp; Know error is prompted when I run code in python idle.&amp;nbsp; When I run the code as a .py script it flashes but then access doesn't open.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Dec 2010 11:59:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/853#M104</guid>
      <dc:creator>DanPajak</dc:creator>
      <dc:date>2010-12-30T11:59:38Z</dc:date>
    </item>
    <item>
      <title>Re: Launching .exe in python</title>
      <link>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/854#M105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;i ran the code in python with in arcmap instead of idle and I get an error.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; import subprocess subprocess.Popen([r"C:\Program Files\Microsoft Office\Office12\MSACCESS.EXE])&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Parsing error &amp;lt;type 'exceptions.SyntaxError'&amp;gt;: invalid syntax (line 1)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;gt;&amp;gt;&amp;gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any ideas on this one?&amp;nbsp; I know it is the correct path.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Dec 2010 12:39:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/854#M105</guid>
      <dc:creator>DanPajak</dc:creator>
      <dc:date>2010-12-30T12:39:35Z</dc:date>
    </item>
    <item>
      <title>Re: Launching .exe in python</title>
      <link>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/855#M106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Don't forget the closing quote. Also the two commands should be on separate lines.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Dec 2010 14:26:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/855#M106</guid>
      <dc:creator>LoganPugh</dc:creator>
      <dc:date>2010-12-30T14:26:24Z</dc:date>
    </item>
    <item>
      <title>Re: Launching .exe in python</title>
      <link>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/856#M107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; import subprocess
... subprocess.Popen([r"c:\programs files\Microsoft office\office12\msaccess.exe"])
... 
Runtime error &amp;lt;type 'exceptions.WindowsError'&amp;gt;: [Error 3] The system cannot find the path specified&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;I get this error.&amp;nbsp; Which is odd because I know the path is correct.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:03:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/856#M107</guid>
      <dc:creator>DanPajak</dc:creator>
      <dc:date>2021-12-10T20:03:14Z</dc:date>
    </item>
    <item>
      <title>Re: Launching .exe in python</title>
      <link>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/857#M108</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jeremy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You've garbled the path again. And others may know for sure, but wouldn't the raw string be case sensitive?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Needs to be as entered as in your 12/30 6:39 post (but with the extra closing ").&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Stuart&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jan 2011 14:08:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/857#M108</guid>
      <dc:creator>V_StuartFoote</dc:creator>
      <dc:date>2011-01-03T14:08:30Z</dc:date>
    </item>
    <item>
      <title>Re: Launching .exe in python</title>
      <link>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/858#M109</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Windows' file system is case-insensitive by default so it does not matter what case you give to Python. On UNIX-like OS's it may be a different story.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Jan 2011 14:51:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/858#M109</guid>
      <dc:creator>LoganPugh</dc:creator>
      <dc:date>2011-01-03T14:51:54Z</dc:date>
    </item>
    <item>
      <title>Re: Launching .exe in python</title>
      <link>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/859#M110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for you help I finally was able to launch the access from python.&amp;nbsp; I realized that I couldn't just copy and past code.&amp;nbsp; It only worked when I typed it out.&amp;nbsp; Now that I get access to open is there a way to launch a macro from python.&amp;nbsp; I tried &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; import subprocess
&amp;gt;&amp;gt;&amp;gt; subprocess.Popen([r"C:\Program Files\Microsoft Office\Office12\MSACCESS.EXE" "\\vopcc\gis\GISOPS\StreetNetwork\Routing.mdb" /x WSorderMacro])
SyntaxError: invalid syntax
&amp;gt;&amp;gt;&amp;gt; &lt;/PRE&gt;&lt;SPAN&gt;&amp;nbsp; and also tried &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; import subprocess
&amp;gt;&amp;gt;&amp;gt; subprocess.Popen([r"C:\Program Files\Microsoft Office\Office12\MSACCESS.EXE" "\\vopcc\gis\GISOPS\StreetNetwork\Routing.mdb""WSorderMacro"])

Traceback (most recent call last):
&amp;nbsp; File "&amp;lt;pyshell#41&amp;gt;", line 1, in &amp;lt;module&amp;gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; subprocess.Popen([r"C:\Program Files\Microsoft Office\Office12\MSACCESS.EXE" "\\vopcc\gis\GISOPS\StreetNetwork\Routing.mdb""WSorderMacro"])
&amp;nbsp; File "C:\Python26\ArcGIS10.0\lib\subprocess.py", line 633, in __init__
&amp;nbsp;&amp;nbsp;&amp;nbsp; errread, errwrite)
&amp;nbsp; File "C:\Python26\ArcGIS10.0\lib\subprocess.py", line 842, in _execute_child
&amp;nbsp;&amp;nbsp;&amp;nbsp; startupinfo)
WindowsError: [Error 3] The system cannot find the path specified&lt;/PRE&gt;&lt;SPAN&gt; and get errors.&amp;nbsp; Thanks again for all your help so far it has been much aprreciated:)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:03:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/859#M110</guid>
      <dc:creator>DanPajak</dc:creator>
      <dc:date>2021-12-10T20:03:17Z</dc:date>
    </item>
    <item>
      <title>Re: Launching .exe in python</title>
      <link>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/860#M111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Jeremy,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Others may have a better feel for it, but it seems a little ambitious to use &lt;/SPAN&gt;&lt;STRONG&gt;UNC&lt;/STRONG&gt;&lt;SPAN&gt; ref to the \\vopcc\gis mount while working out syntax and function. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;To simplify debugging,&amp;nbsp; I would copy or subset the Access MDB to the local file system along with the macro, or at the least Windows map the share.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Finally, I think that the args provided to the Popen need to be separated by commas, but still raw. So wouldn't that be:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;subprocess.Popen([r"C:\Program Files\Microsoft Office\Office12\MSACCESS.EXE", r"\\vopcc\gis\GISOPS\StreetNetwork\Routing.mdb", r"/x WSorderMacro"])&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Stuart&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jan 2011 13:56:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/860#M111</guid>
      <dc:creator>V_StuartFoote</dc:creator>
      <dc:date>2011-01-04T13:56:33Z</dc:date>
    </item>
    <item>
      <title>Re: Launching .exe in python</title>
      <link>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/861#M112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Based on the Python help on subprocess, you can (and on Windows, probably should) use a string instead of a list of arguments to specify the command line. Access seems particularly picky about how you specify its command line. This should work:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
import subprocess
subprocess.Popen(r'"C:\Program Files\Microsoft Office\Office12\MSACCESS.EXE" "\\vopcc\gis\GISOPS\StreetNetwork\Routing.mdb" /X WSorderMacro')&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Note the raw string indicator, single quotes around the entire string, and the double quotes around paths (which are required if the path contains spaces, but it's good to include them anyways).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:03:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/861#M112</guid>
      <dc:creator>LoganPugh</dc:creator>
      <dc:date>2021-12-10T20:03:19Z</dc:date>
    </item>
    <item>
      <title>Re: Launching .exe in python</title>
      <link>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/862#M113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;This is how I open excel and it works fine. I use a list of arguments separated by a comma. Both are rawed strings.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
subprocess.Popen([r'C:\Program Files\Microsoft Office\OFFICE11\EXCEL.exe',r'C:\GIS Projects\TaxChange\Export\Change.xls'])
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:03:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/862#M113</guid>
      <dc:creator>ChrisMathers</dc:creator>
      <dc:date>2021-12-10T20:03:22Z</dc:date>
    </item>
    <item>
      <title>Re: Launching .exe in python</title>
      <link>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/863#M114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have finally got it to open and run the macro.&amp;nbsp; Thanks again for all your help.&amp;nbsp; &lt;/SPAN&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&amp;gt;&amp;gt;&amp;gt; import subprocess
&amp;gt;&amp;gt;&amp;gt; subprocess.Popen([r'C:\Program Files\Microsoft Office\Office12\MSACCESS.EXE',r'\\vopcc\gis\GISOPS\StreetNetwork\Routing.mdb'])&lt;/PRE&gt;&lt;SPAN&gt;I am having one small issue when I save the file as a .py file type and then double click on the file nothing happens.&amp;nbsp; How do I make this script into a .py file and run the script off of that.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:03:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/863#M114</guid>
      <dc:creator>DanPajak</dc:creator>
      <dc:date>2021-12-10T20:03:25Z</dc:date>
    </item>
    <item>
      <title>Re: Launching .exe in python</title>
      <link>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/864#M115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are the literal &amp;gt;&amp;gt;&amp;gt;s in your script? If so, that's your problem.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 04 Jan 2011 20:06:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/864#M115</guid>
      <dc:creator>JasonScheirer</dc:creator>
      <dc:date>2011-01-04T20:06:15Z</dc:date>
    </item>
    <item>
      <title>Re: Launching .exe in python</title>
      <link>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/865#M116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thank You very much.&amp;nbsp; I removed the &amp;gt;&amp;gt;&amp;gt; and am now able to launch this from a .py.&amp;nbsp;&amp;nbsp; Thank you all for your help.&amp;nbsp; Had to redu a whole work process because of ArcMap 10 going away with VB.&amp;nbsp; Hopefully creating all the buttons in Python I will not have to change this again.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Jan 2011 12:13:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/865#M116</guid>
      <dc:creator>DanPajak</dc:creator>
      <dc:date>2011-01-05T12:13:30Z</dc:date>
    </item>
    <item>
      <title>Re: Launching .exe in python</title>
      <link>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/866#M117</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I also had this problem but didn't see the answer in where vopgis said he got it to work so I am including a script that I got to work. Note: the popen runs the process in parallel and what I wanted was to finished a process then move on.&amp;nbsp; if you use the subprocess.call(program)&amp;nbsp; it will finish the msaccess call then continue.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import subprocess
def MacroAccess(when):
&amp;nbsp;&amp;nbsp;&amp;nbsp; if when == 'Nightly': #either Nightly or Weekly
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; program = r'"C:\Program Files (x86)\Microsoft Office\OFFICE11\msaccess.exe" "c:\ftp\import2.mdb " /x NightlyBatch'
&amp;nbsp;&amp;nbsp;&amp;nbsp; elif when == 'Weekly':
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; program = r'"C:\Program Files (x86)\Microsoft Office\OFFICE11\msaccess.exe" "c:\ftp\import2.mdb " /x WeeklyBatch'
&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 'no'
&amp;nbsp;&amp;nbsp;&amp;nbsp; print when + 'batch'
&amp;nbsp;&amp;nbsp;&amp;nbsp; subprocess.call(program)
&amp;nbsp;&amp;nbsp;&amp;nbsp; return when + 'Batch has run'
&amp;nbsp;&amp;nbsp;&amp;nbsp; print 'done'

print MacroAccess('Nightly')&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:03:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/866#M117</guid>
      <dc:creator>JohnHawkins</dc:creator>
      <dc:date>2021-12-10T20:03:27Z</dc:date>
    </item>
    <item>
      <title>Re: Launching .exe in python</title>
      <link>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/867#M118</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know this is an old thread but this seems to work for me:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import os 

filepath = r"C:\project_front.accdb"
os.system("start MSACCESS.EXE {}".format(&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;filepath &lt;/SPAN&gt;))&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Wes, I just updated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 20:03:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/867#M118</guid>
      <dc:creator>LukeSturtevant</dc:creator>
      <dc:date>2021-12-10T20:03:30Z</dc:date>
    </item>
    <item>
      <title>Re: Launching .exe in python</title>
      <link>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/868#M119</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Luke shouldn't line 4 be&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: inherit; color: black; font-weight: inherit; font-size: 9pt !important; font-style: inherit;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14545121386523879 jive_text_macro" data-renderedposition="68_8_912_16" jivemacro_uid="_14545121386523879" modifiedtitle="true"&gt;&lt;P&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f6f6f6;"&gt;os.system(&lt;/SPAN&gt;&lt;SPAN class="string" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: blue; background-color: #f6f6f6;"&gt;"start MSACCESS.EXE {}"&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f6f6f6;"&gt;.format(filepath)) &lt;/SPAN&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Feb 2016 15:09:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/launching-exe-in-python/m-p/868#M119</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2016-02-03T15:09:15Z</dc:date>
    </item>
  </channel>
</rss>

