Execute commands on the server?
Moderator: General Moderators
Execute commands on the server?
How can I execute commands on my Windows (XP x64 edition) Server. I was hoping to be able to run programs and maybe even stop them on my server. Like, for a remote management type thing..
How do I do this?
Thanks for any input you kind people may have.
How do I do this?
Thanks for any input you kind people may have.
- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
Well, if you were on Unix, I would have pointed you to pcntl_fork, but to be blunt, at this point, PHP isn't the best language for this sort of task.
What happens if it "hangs"?
I was thinking of something liek this to run commands specified in a form submitted:
I was thinking of something liek this to run commands specified in a form submitted:
Code: Select all
<?php
exec ( $stuff );
?>
Last edited by toasty2 on Mon May 29, 2006 11:06 am, edited 2 times in total.
- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
Code: Select all
<?php
exec("C:\Documents and Settings\Administrator\Desktop\winlister.exe");
?>- Ambush Commander
- DevNet Master
- Posts: 3698
- Joined: Mon Oct 25, 2004 9:29 pm
- Location: New Jersey, US
It doesnt work, it isnt starting the program.
Code: Select all
<?php
exec("C:\\Documents and Settings\\Administrator\\Desktop\\winlister.exe");
?>- Chris Corbyn
- Breakbeat Nuttzer
- Posts: 13098
- Joined: Wed Mar 24, 2004 7:57 am
- Location: Melbourne, Australia