<?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: System exec displays an error popup in LabVIEW</title>
    <link>https://ni.lithium.com/t5/LabVIEW/System-exec-displays-an-error-popup/m-p/2951807#M851663</link>
    <description>&lt;P&gt;My outlook.exe is in C:\Program Files (x86)\Microsoft Office\Office14.&amp;nbsp; I got the error you mentioned when I ran your snippet (corrected for office 12/14), but got no error when I removed the third element from your array.&amp;nbsp; It seems that %programfiles% is clever enough to get the program from (x86).&amp;nbsp; I do have a C:\Program Files\Microsoft Office\Office14 folder, but there's no outlook.exe in it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/21322026f8a8b5abbe4c77b61280be102ea62f99/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31353134323969423436313943414639433543313039412f696d6167652d73697a652f6f726967696e616c3f763d6d70626c2d312670783d2d31" border="0" alt="Example_VI_BD.png" title="Example_VI_BD.png" align="center" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;I found&amp;nbsp;&lt;A href="http://stackoverflow.com/questions/138981/how-do-i-test-if-a-file-is-a-directory-in-a-batch-script" target="_blank"&gt;this on Stack Overflow&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 13 Aug 2014 16:08:02 GMT</pubDate>
    <dc:creator>jcarmody</dc:creator>
    <dc:date>2014-08-13T16:08:02Z</dc:date>
    <item>
      <title>System exec displays an error popup</title>
      <link>https://ni.lithium.com/t5/LabVIEW/System-exec-displays-an-error-popup/m-p/2951617#M851633</link>
      <description>&lt;P&gt;Hi community,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;in certain cases I need to shut down and restart outlook. In order to do so I a batch file what I want to get rid of and do everything from LabVIEW. When I run the following snippet I receive an error popup complaining that the path is not valid. Which is true because on some computers outlook is in the program files folder, in some computer it is in the program files(x86) folder, but that should not be a problem because of the "IF EXIST". It works fine from the batch file.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please help me out here.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ps: I know this is not the right way. I would like to use activeX but I have not found any way to actually start outlook. (I need to have it open, not just sending a mail with activeX)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/13bc4e2aaf7dca234d97b7570712f954aef9570b/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31353134313769383934374345354543354334413130362f696d6167652d73697a652f6f726967696e616c3f763d6d70626c2d312670783d2d31" border="0" alt="system_exec.png" title="system_exec.png" align="center" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Aug 2014 14:30:33 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/System-exec-displays-an-error-popup/m-p/2951617#M851633</guid>
      <dc:creator>1984</dc:creator>
      <dc:date>2014-08-13T14:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: System exec displays an error popup</title>
      <link>https://ni.lithium.com/t5/LabVIEW/System-exec-displays-an-error-popup/m-p/2951649#M851638</link>
      <description>&lt;P&gt;Hi 1984,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I usually create a small batch file for such tasks: this way you could combine the "IF EXISTS" into a more complex IF-THEN-ELSE structure…&lt;/P&gt;</description>
      <pubDate>Wed, 13 Aug 2014 14:41:14 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/System-exec-displays-an-error-popup/m-p/2951649#M851638</guid>
      <dc:creator>GerdW</dc:creator>
      <dc:date>2014-08-13T14:41:14Z</dc:date>
    </item>
    <item>
      <title>Re: System exec displays an error popup</title>
      <link>https://ni.lithium.com/t5/LabVIEW/System-exec-displays-an-error-popup/m-p/2951653#M851639</link>
      <description>&lt;P&gt;Yes... I can do that very easily. But I would rather keep this function in the code itself.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Aug 2014 14:43:00 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/System-exec-displays-an-error-popup/m-p/2951653#M851639</guid>
      <dc:creator>1984</dc:creator>
      <dc:date>2014-08-13T14:43:00Z</dc:date>
    </item>
    <item>
      <title>Re: System exec displays an error popup</title>
      <link>https://ni.lithium.com/t5/LabVIEW/System-exec-displays-an-error-popup/m-p/2951669#M851642</link>
      <description>&lt;P&gt;- create the batch file as string constant.&lt;/P&gt;
&lt;P&gt;- save the string to a temporary file&lt;/P&gt;
&lt;P&gt;- SystemExec the temporary batch file&lt;/P&gt;
&lt;P&gt;- delete the temporary batch file&lt;/P&gt;
&lt;P&gt;All within your code… &lt;span class="lia-unicode-emoji" title=":grinning_face_with_smiling_eyes:"&gt;😄&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Aug 2014 14:52:04 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/System-exec-displays-an-error-popup/m-p/2951669#M851642</guid>
      <dc:creator>GerdW</dc:creator>
      <dc:date>2014-08-13T14:52:04Z</dc:date>
    </item>
    <item>
      <title>Re: System exec displays an error popup</title>
      <link>https://ni.lithium.com/t5/LabVIEW/System-exec-displays-an-error-popup/m-p/2951711#M851645</link>
      <description>&lt;P&gt;No its not. That requires a file to get saved to the hdd.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Aug 2014 15:08:42 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/System-exec-displays-an-error-popup/m-p/2951711#M851645</guid>
      <dc:creator>1984</dc:creator>
      <dc:date>2014-08-13T15:08:42Z</dc:date>
    </item>
    <item>
      <title>Re: System exec displays an error popup</title>
      <link>https://ni.lithium.com/t5/LabVIEW/System-exec-displays-an-error-popup/m-p/2951807#M851663</link>
      <description>&lt;P&gt;My outlook.exe is in C:\Program Files (x86)\Microsoft Office\Office14.&amp;nbsp; I got the error you mentioned when I ran your snippet (corrected for office 12/14), but got no error when I removed the third element from your array.&amp;nbsp; It seems that %programfiles% is clever enough to get the program from (x86).&amp;nbsp; I do have a C:\Program Files\Microsoft Office\Office14 folder, but there's no outlook.exe in it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;IMG src="https://ip1.i.lithium.com/21322026f8a8b5abbe4c77b61280be102ea62f99/68747470733a2f2f6e692e6c69746869756d2e636f6d2f74352f696d6167652f736572766572706167652f696d6167652d69642f31353134323969423436313943414639433543313039412f696d6167652d73697a652f6f726967696e616c3f763d6d70626c2d312670783d2d31" border="0" alt="Example_VI_BD.png" title="Example_VI_BD.png" align="center" /&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="text-decoration: line-through;"&gt;I found&amp;nbsp;&lt;A href="http://stackoverflow.com/questions/138981/how-do-i-test-if-a-file-is-a-directory-in-a-batch-script" target="_blank"&gt;this on Stack Overflow&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Aug 2014 16:08:02 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/System-exec-displays-an-error-popup/m-p/2951807#M851663</guid>
      <dc:creator>jcarmody</dc:creator>
      <dc:date>2014-08-13T16:08:02Z</dc:date>
    </item>
    <item>
      <title>Re: System exec displays an error popup</title>
      <link>https://ni.lithium.com/t5/LabVIEW/System-exec-displays-an-error-popup/m-p/2952461#M851779</link>
      <description>&lt;P&gt;&amp;lt;facepalm&amp;gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;thanks Jim! Work like a charm.&lt;/P&gt;</description>
      <pubDate>Thu, 14 Aug 2014 08:37:36 GMT</pubDate>
      <guid>https://ni.lithium.com/t5/LabVIEW/System-exec-displays-an-error-popup/m-p/2952461#M851779</guid>
      <dc:creator>1984</dc:creator>
      <dc:date>2014-08-14T08:37:36Z</dc:date>
    </item>
  </channel>
</rss>

