Remote Rebooting of a Program

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Zorth
Forum Commoner
Posts: 76
Joined: Fri Feb 20, 2004 8:00 pm

Remote Rebooting of a Program

Post by Zorth »

Hey,

Is there a function out there which would allow you to 1. Shut down a program, and 2. Start up a program? I basically need this to allow people running a game I am hosting to reboot the program in case it crashes. I had little luck finding such a thing over the internet. For Windows BTW.

Thanks.
User avatar
AVATAr
Forum Regular
Posts: 524
Joined: Tue Jul 16, 2002 4:19 pm
Location: Uruguay -- Montevideo
Contact:

Post by AVATAr »

try exec() or similar.. look in the manual
Zorth
Forum Commoner
Posts: 76
Joined: Fri Feb 20, 2004 8:00 pm

Post by Zorth »

system("pskill <programname>"); works for shutting it down. Pskill kills processes.

But starting it up, it seems like it runs if I do: system("\folder\file.exe");
it even shows up when I check Task Messenger, but it never goes through, and the program never shows up on the Taskbar or anywhere else.
Post Reply