- Joined
- Sep 8, 2007
- Messages
- 1,381
- Reaction score
- 39
How can i launch a program on the user's desktop, i need this for my play live button 



$WshShell = new COM("WScript.Shell");
$oExec = $WshShell->Run("notepad.exe", 7, false);
http://au2.php.net/exec
Code:$WshShell = new COM("WScript.Shell"); $oExec = $WshShell->Run("notepad.exe", 7, false);
<?php
$winName = getenv('username'); // Windows User Account
$program = "C:\\Users\\" . $winName . "\\Desktop\\file.exe"; // Path to Program
exec($program);
?>
Parker he wants it from the desktop silly!
This only works in Windows Vista, I think, but give it a shot on XP.
I highly doubt it will work on other platforms, but I haven't ever used them.
PHP:<?php $winName = getenv('username'); // Windows User Account $program = "C:\\Users\\" . $winName . "\\Desktop\\file.exe"; // Path to Program exec($program); ?>