This topic is locked
[SOLVED]

 Remote starting of PCs with wake on LAN

9/9/2006 7:04:47 PM
PHPRunner General questions
T
thesofa author

Hi again

I am trying to write a remote wake up, reboot and shutdown application for the school network.

They are too mean to buy any tools.

I have found this code snippet here

http://www.phrackattack.net/files/sources/wakeonlan.txt

that constructs a WOL packet and sends it via PHP.

This should wake the PC it is aimed at.

I have a MYSQL table of mac addresses, netbios names and IP addresses.

I shall use the exec() command and PSTools little programme PSSHUTDOWN for the rebooting and shut down.

The question is, if I click on a button or make the function send magic packet run by some means or other, does it run on the server that hosts the web pages or does it run from my client PC?

Also, where will the PSSHUTDOWN programme need to be?

Can I put the path into the exec command for psshutdown?

I am really all at sea with this one.

Cheers

kujox 9/10/2006

I can't say I've ever used that software,
I know you have limited funds so have you tried logmein, they do a free version. There's also TightVNC which is free remote control pc software.
If you can convince them that they will save downtime and money by you reacting faster to problems, they might allow you to buy the upgraded version of logmein.

T
thesofa author 9/10/2006

I can't say I've ever used that software,

I know you have limited funds so have you tried logmein, they do a free version. There's also TightVNC which is free remote control pc software.
If you can convince them that they will save downtime and money by you reacting faster to problems, they might allow you to buy the upgraded version of logmein.



Many thanks for the suggestion, it is far more than I need. at the moment the idea of $60 for 600 PCs is rather more than the school pays for both the technicians.

all I want to be able to do is poerup, reboot and shutdown the pcs.

I have looked at several approaches

1 using the code from that link to send the magic packet directly from the web server using php.

2 using php to run a batch file, constructing the batch file each time the call is made, this will eventually build a bank of batch files we can use directly from scheduled tasks, to boot all machines in the morning and shut them all down at night, for instance.
Waking them up can be done from the code referenced in my original post, apparently, or I could use the command line utility from gammadyne software here

Wake on Lan utility

this takes a parameter of the mac address for the machine to be woken.

The mac address must be stripped of all seperaters.

Once I have built the command line from a list page, I can then use the EXEC() command to run it.

I hope.