Jump to content

Launching external Application help!


sleepykangaroo

Recommended Posts

Hello everyone.

I want to be able to launch utorrent while im not at home

and since running a web server I thought i'd use PHP.

 

I've tried using system and exec but every time I run it, they run in the background.

Now i know if I go into services.msc and allow the service to interface with the desktop it will display it.

But i wanted to know if there is away inside of PHP to launch the application and it will be visible.

 

TYIA

 

-James :)

Link to comment
https://forums.phpfreaks.com/topic/126459-launching-external-application-help/
Share on other sites

Yes, if you want to execute an application and have it visible on the computer running php, you use the backtick operator

 

`myprogram.exe`

eg. in windows

`"C:\Program Files\Some Application\executable.exe"`

 

if you want to see it from your browser?... download a desktop viewing application like realvnc, ultravnc, etc.

 

edit: for clarity.

I was looking into the runas command for example

 

$test = "runas /user:homepc/PCCPanel notepad.exe";

system($test);

but it asks for me to enter a password, is there away i can pass the password to command prompt

so basically running to command in the same "system"

 

 

using the backtick operator worked yes, but did not launch it to my desktop. was still being run as the user "SYSTEM"

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.