Note that there are some explanatory texts on larger screens.

plurals
  1. POphp exec() responding differently from windows 8 metro app
    primarykey
    data
    text
    <p>I wanted to change the tile icons for desktop applications in the new windows 8 start menu. So they would fit in with the other metro apps.</p> <p>I made a simple metro app that calls a simple localhost php file</p> <pre><code>&lt;?php // check if the chrome is in the task list exec('tasklist /FI "IMAGENAME eq chrome.exe" 2&gt;NUL | find /I /N "chrome.exe"&gt;NUL'); // get a return value I can check $runing = exec('if "%ERRORLEVEL%"=="0" echo Programm is running'); if ($runing === 'Programm is running'){ // the program is open already echo $runing; } else { // the program is not running and should be opened exec('C:\Users\Gerdy\AppData\Local\Google\Chrome\Application\chrome.exe'); } ?&gt; </code></pre> <p>If I launch this file from chrome it echos "Programm is running".</p> <p>That's great!</p> <p>If I launch it from windows start and Chrome is not running, Chrome does not start.</p> <p>If I exclude the if statement and just run.</p> <pre><code>exec('C:\Users\Gerdy\AppData\Local\Google\Chrome\Application\chrome.exe'); </code></pre> <p>From the start menu. It will open a new Chrome window regardless of if chrome is already open.</p> <p>So I guess my question is : What can I do that will allow my php file to check if chrome is open and if it is not , to open it?</p> <p>This model actually works for any other program just not browsers.</p> <p>My best guess is that it has do less with my commands and more to do with chrome itself. It could be a target that I need to add, I don't know.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload