Home | Blog | Software | Reviews and Features | Forum | Help | Donate | About us
topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • December 08, 2016, 09:42:41 PM
  • Proudly celebrating 10 years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: Turning a pc on and off remotely  (Read 9494 times)

mediaguycouk

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 245
    • View Profile
    • Mediaguy
    • Donate to Member
Turning a pc on and off remotely
« on: July 16, 2008, 03:15:37 AM »
I've been talking about Wake over network recently and have successfully managed to make my computer wake from sleep (but not off) via a PHP script on my webpage.

Is there a way of making the computer go to sleep via a webpage? I'm mostly thinking of using Orb via my mobile phone so won't have access to a remote desktop connection, but I could put IIS onto the computer (Vista Enterprise SP1) if IIS could shut down the computer.

Or is there just a program that could do it (that could also be placed on a phone or loaded from a webpage).

Thank you experts!
Learning C# - Graham Robinson

f0dder

  • Charter Honorary Member
  • Joined in 2005
  • ***
  • Posts: 9,029
  • [Well, THAT escalated quickly!]
    • View Profile
    • f0dder's place
    • Read more about this member.
    • Donate to Member
Re: Turning a pc on and off remotely
« Reply #1 on: July 16, 2008, 04:57:35 AM »
Hm, you say you've been able to wake your computer from your webpage - does this mean your computer is set up as a DMZ (ie., receives all internet-traffic directly)? Or (which I hope) that you have a webserver running at home, behind a NAT, with only port 80 forwarded?

You might want to look at PsShutdown from sysinternals' PsTools - that's pretty useful for running on LANs, but I personally don't want to allow netbios (or whatever Ps* requires) traffic inwards from WAN->LAN...
- carpe noctem

mediaguycouk

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 245
    • View Profile
    • Mediaguy
    • Donate to Member
Re: Turning a pc on and off remotely
« Reply #2 on: July 16, 2008, 05:16:40 AM »
No I have router that has port 7 forwarded. Webpage is on my website, hidden away in folders and then the PHP script requires a password.

You could bypass that, but you'd need my mac address, which (I believe) doesn't leave the router.
Learning C# - Graham Robinson

mediaguycouk

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 245
    • View Profile
    • Mediaguy
    • Donate to Member
Re: Turning a pc on and off remotely
« Reply #3 on: July 16, 2008, 07:57:03 AM »
This video - http://www.metacafe....r_with_a_cell_phone/ - reminded me of something easy.

Make outlook open automatically. Send email via phone to outlook. Outlook runs a rule on it and runs a program that can sleep the PC.

This will be fun to try :)
Learning C# - Graham Robinson

4wd

  • Supporting Member
  • Joined in 2006
  • **
  • Posts: 4,475
    • View Profile
    • Donate to Member
Re: Turning a pc on and off remotely
« Reply #4 on: July 16, 2008, 08:08:29 AM »
Or is there just a program that could do it (that could also be placed on a phone or loaded from a webpage).

Thank you experts!

I'm no expert but couldn't you just have a link on your web page that calls javascript to run the shutdown.exe command?

To put the machine into Hibernate/Sleep/Standby you'll either need the Win2000 shutdown command or a third-party version, (eg. Shutdown.zip or Wizmo), as the XP version doesn't have those options.

Or won't this work due to authorisation problems?

Having just noted your reply about the email concept, I seem to remember a free program that acted as a small email client daemon that you could send commands to, (eg. send a file, run a program, etc), but I can't remember what it was called and haven't had much luck Googling.

mediaguycouk

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 245
    • View Profile
    • Mediaguy
    • Donate to Member
Re: Turning a pc on and off remotely
« Reply #5 on: July 16, 2008, 08:13:41 AM »
My web page (www.mediaguy.co.uk) is not on my computer. I was saying I could set up IIS on my PC, but I'd prefer not to.

Also worth mentioning that any shutdown command would need to know Vista's 'sleep' command as my computer cannot wake from a full shutdown.
Learning C# - Graham Robinson
« Last Edit: July 16, 2008, 08:16:37 AM by mediaguycouk »

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,768
    • View Profile
    • Donate to Member
Re: Turning a pc on and off remotely
« Reply #6 on: July 16, 2008, 09:52:41 AM »
You might try Shutter by Denis Kozlov.  :Thmbsup: :Thmbsup:

From the website:
Quote
Shutter  2.90
Shutter is a multifunctional shutdown utility, which has a user friendly and easy-to-use interface and supports many different Events and Actions. Events: Countdown, On Time, Winamp Stops, Low CPU Usage, User Inactive, Battery Low, Window Closes, Process Stops, Ping Stops, File Size Limit; Actions: Shutdown, Reboot, LogOff, Lock Workstation, Sleep, Hibernate, Monitor Turn Off, Mute/UnMute Master Volume, Hang Up, Alarm; Also, it is able to play a custom sound and/or run a program of your choice, in addition to the simple shutdown message. Optionally, Shell Links can be created to immediately execute any of the supported actions from the desktop. Web Interface - allows Remote Execution of any Action, it also displays some run-time information about the computer: Logged In User, Up Time, List of Processes, Screenshot of a Desktop, plus Command Line Execution.

Download link:

http://www.den4b.com/projects.php

I've tried a bunch of shutdown utilities, and this is the one I kept. I use it on my Win 2003 server. It does everything I've ever needed it to do.
« Last Edit: July 16, 2008, 09:55:11 AM by 40hz »

mediaguycouk

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 245
    • View Profile
    • Mediaguy
    • Donate to Member
Re: Turning a pc on and off remotely
« Reply #7 on: July 16, 2008, 10:19:53 AM »
Wow, web interface for shutter looks exactly what I'm looking for. Seems amazing!
Learning C# - Graham Robinson

mediaguycouk

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 245
    • View Profile
    • Mediaguy
    • Donate to Member
Re: Turning a pc on and off remotely
« Reply #8 on: July 16, 2008, 11:44:46 AM »
So annoying. Shutter does *exactly* what I want it to but the settings in the program doesn't allow me to port forward through my router to the program
Learning C# - Graham Robinson

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,768
    • View Profile
    • Donate to Member
Re: Turning a pc on and off remotely
« Reply #9 on: July 16, 2008, 12:59:36 PM »
Why can't you set your router to port forward xxx.xxx.xxx.xxx.nn to your box where nn is an arbitrary high port number you select within Shutter? I use port 5678. I have my fixed IP forward to my internal address with no problem. You could even assign separate port numbers to different machines if you need to shutdown more than one device. You may need to adjust your firewall settings to allow the port you select to pass http. See below. (1= Setup 2=Firewall setting 3=It Works!!!)

(Note: I'm showing the web interface from inside my network, but it works from outside it as well.)

shot1.jpg

Oh yeah...this isn't documented: After you do your web admin setup, launch Shutter, and then minimize it. It then will be active in the task tray. You'll want to set it up to autostart minimized. Sorta obvious when you think about it. It doesn't run as a service, so it needs to be invoked in order to open and listen on the port you select.
« Last Edit: July 16, 2008, 01:51:27 PM by 40hz »

mediaguycouk

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 245
    • View Profile
    • Mediaguy
    • Donate to Member
Re: Turning a pc on and off remotely
« Reply #10 on: July 16, 2008, 01:44:12 PM »
I tried that but it failed to work. I'm actually wondering if it is a problem with my router rather than the program though.

However, after working hard I've swapped the program with 'Switch off' (I don't know who has ripped off who but both look exactly the same) except that switch off can install itself as a service and seems happier with my router.

So, in the last 5 minutes, I have got my work phone out and

Switched off my computer by going to my website, which then forwards me to the switch off web interface, where I can set it to sleep
Switched on my computer by going to my website and typing in my pin, where the wake on network packet is sent to my computer

Result! Orb here we come!

Also, I'd blank your IP and blank your password better. I think I could guess that username and password...
Learning C# - Graham Robinson
« Last Edit: July 16, 2008, 01:45:55 PM by mediaguycouk »

40hz

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 11,768
    • View Profile
    • Donate to Member
Re: Turning a pc on and off remotely
« Reply #11 on: July 16, 2008, 06:28:39 PM »

Also, I'd blank your IP and blank your password better. I think I could guess that username and password...

S'ok. I changed the user/pw combo before I took the snapshot.  And 10.xxx.xxx.xxx is a non-routable IP address range. 8)

BTW: Thanks for identifying Switch Off. If it runs as a service I'll be using that instead. Thankee! :Thmbsup:

The_Doomer

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 16
    • View Profile
    • Donate to Member
Re: Turning a pc on and off remotely
« Reply #12 on: August 15, 2008, 03:12:04 PM »
Have a look at this site, there are some solutions. http://www.depicus.com/wake-on-lan/

 :D
PGP Fingerprint: F8FC 92DF AAD2 D91C 1B07  01A6 118F 251B 85EC 1FCE