Page 1 of 1

running external command w/o showing

Posted: Wed Apr 16, 2008 2:03 am
by joe_T
Hi
I am trying to run an .exe file on my server, at user's request.
My page is in ActionScript 3.
To do so, the user's click opens a new window which loads a PHP file that runs my .exe.
Once the .exe is done with it's job, I wish to close that window automatically.
A better thing would be not to open the window in the first place, just run the php script.
Is there a way to do any of these?
Thanks,
Joe

Re: running external command w/o showing

Posted: Wed Apr 16, 2008 4:23 am
by N1ck
Hi Joe

I am having a similar problem. I used the following code on my test server:

<?php
$cmd = '"c:\\Program Files\\Messenger\\msmsgs.exe"';
$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run($cmd, 7, false);
?>

this will launch MSN messenger or any application you choose, minimised without showing the cmd window. This wont solve all your problems but I hope it helps, there is a little more info on my post: Post subject: Local test Server Configuration

regards

Nick