Jump to content

execute script with php


vaskovasilev

Recommended Posts

Hello ,

i am trying to start script for start/stoping services on remote server .

I use this script :

 

<?php
if(isset($_POST['start']))
{
   exec('call scripts/start.cmd');
}
?>
<input type="submit" value="Start" name="start" class="submit_button">

 

the start.cmd is :

sc \\serverip start Spooler

 

When i start the script for my machine Spooler service , everything is ok . (sc start Spooler)

But when i want to start the spooler on another machine .. it doesn't start .

I am administrator for the other machine .

Can you help me ?

 

Link to comment
https://forums.phpfreaks.com/topic/199120-execute-script-with-php/
Share on other sites

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.