title: Execute external program ( like skype.exe) using php
body: <p>I have tried launch an external application installed in the C:\Program Files (x86)\Hewlett-Packard\HP MyRoom\MyRoom.exe using php.</p>
  
  <p><strong>SAMPLE 1 :</strong> 
   I'm using exec function and popen and system. 
  But exec function is not executing the code next to the exec command until the application is closed. </p>
  
  <pre><code>**CODE :** 
  exec('"C:\Program Files (x86)\Hewlett-Packard\HP MyRoom\MyRoom.exe" ');
  </code></pre>
  
  <p><strong>SAMPLE 2 :</strong> 
  WHen i use the popen ,it is displaying a cmd window instead of application. </p>
  
  <pre><code>CODE : 
  
  pclose(popen('start   "C:\Program Files (x86)\Hewlett-Packard\HP MyRoom\MyRoom.exe" ' ,'r'));
  
  OR
  
  system(' start "C:\\Program Files (x86)\\Hewlett-Packard\\HP MyRoom\\MyRoom.exe"  ');
  </code></pre>
  
  <p><strong>OUTPUT :</strong> 
  <img src="https://i.stack.imgur.com/0SWLw.png" alt="enter image description here">
  <strong>SAMPLE 3 :</strong> </p>
  
  <p>When i user this code, it is return string output.</p>
  
  <p>CODE : </p>
  
  <pre><code>system(' start /B "C:\\Program Files (x86)\\Hewlett-Packard\\HP MyRoom\\MyRoom.exe"  ');
  </code></pre>
  
  <p>OUTPUT : </p>
  
  <pre><code>Microsoft Windows [Version 6.3.9600] (c) 2013 Microsoft Corporation. All rights reserved. C:\xampp\htdocs\projects\drupal\hpedu\reference&gt;
  Any help would be greatly appreciated. 
  </code></pre>
  
  <p><strong>SAMPLE 4 :</strong> </p>
  
  <p>WHen i try this code, it is not returning anything. </p>
  
  <p>CODE :   </p>
  
  <pre><code>  exec("start /B  \"C:\\Program Files (x86)\\Hewlett-Packard\\HP MyRoom\\notepad++.exe\\MyRoom.exe\"  ");
  </code></pre>