Shutdown another PC?

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
upD8R Offline
Senior Member
Posts: 119
Joined: Jun 2011
Reputation: 2
Location: Germany
Post: #1
Hi there,

there are a few WOL solutions available but I'm looking for the opposite: shutdown another Windows PC with XBMC.

Any idea?
find quote
jj0076 Offline
Member
Posts: 71
Joined: Oct 2011
Reputation: 0
Post: #2
The method I went for was to write a batch file to handle the remote shutdown, then made this batch file into a .exe file using some freeware (name escapes me off the top of my head). Then I used the advanced launcher add on to run the new .exe file. The advanced launcher command can then be set as a favourite and depending on your choice of skin added to the homepage.

One tip before you start, make sure you have remote shutdown working before you try to build it into xbmc.
find quote
upD8R Offline
Senior Member
Posts: 119
Joined: Jun 2011
Reputation: 2
Location: Germany
Post: #3
Hi there,

thanks for the response. I ended up writing an XBMC addon which opens a telnet session to my target PC and shutdown/restart/hibernate the system. Was a funny exercise considering I don't have any knowledge about Python.

But it seems to work.
find quote
jj0076 Offline
Member
Posts: 71
Joined: Oct 2011
Reputation: 0
Post: #4
Glad you found a solution.
find quote
mensareject Offline
Junior Member
Posts: 3
Joined: Oct 2012
Reputation: 0
Post: #5
Would you be willing to share this addon? I've been looking for this as well.
find quote
asr10 user Offline
Junior Member
Posts: 25
Joined: Feb 2009
Reputation: 0
Post: #6
Also looking for this. Telnet into my unraid server to shut it down from xbmc would be great.
find quote
upD8R Offline
Senior Member
Posts: 119
Joined: Jun 2011
Reputation: 2
Location: Germany
Post: #7
Well, here's my addon.
https://dl.dropbox.com/u/1304592/script....-pc_05.zip

Actually, I did not do any further development but it works for me from Windows 7 to Windows 7 under Eden and Frodo.
So don't expect any documentation but config should be almost self-explaining. Wink

XBMC 12 & Aeon Nox 4 running on 3x Windows 7 x64
mySQL hosted on WHS 2011
find quote
testmetest Offline
Member
Posts: 73
Joined: Apr 2009
Reputation: 0
Post: #8
Hi, thanks for the add-on!

I had some troubles from being a noob. So other people can learn from my mistake:

1. If you have 3 PC's and one keyboard and monitor, for god's sake, make sure you are ping the computer you want! I spent like 20 minutes until I realized I was working with the wrong computer.
2. Install telnet server on the server and telnet client on the client.
3. Add telnet user via lusrmgr.msc on server

Profit!

Now you can go to XBMC > Programs and execute the script.

My only question at this point... Do you know what the XML line is to execute? That way I can put the command on the main page where I have my shutdown options.
(This post was last modified: 2013-09-08 05:03 by testmetest.)
find quote
upD8R Offline
Senior Member
Posts: 119
Joined: Jun 2011
Reputation: 2
Location: Germany
Post: #9
No idea. I put it to my favorites, so I can access it quite easily from the overall shutdown menu (pressing S on the keyboard or remote).

XBMC 12 & Aeon Nox 4 running on 3x Windows 7 x64
mySQL hosted on WHS 2011
find quote
testmetest Offline
Member
Posts: 73
Joined: Apr 2009
Reputation: 0
Post: #10
I'm finally learning a little...

Put this in your XML's and and it'll call the script:

<onclick>RunScript(script.telnet-shutdown.windows-pc)</onclick>
find quote
upD8R Offline
Senior Member
Posts: 119
Joined: Jun 2011
Reputation: 2
Location: Germany
Post: #11
Thanks, interesting finding.

XBMC 12 & Aeon Nox 4 running on 3x Windows 7 x64
mySQL hosted on WHS 2011
find quote
Eric37 Offline
Junior Member
Posts: 2
Joined: Jul 2013
Reputation: 0
Post: #12
You can use this DOS command Not familiar enough with XBMC at the moment to know how to issue a DOS command.

> shutdown /s /m \\COMPUTERNAME

If you want to reboot the computer use /r instead of /s
find quote