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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.