<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>burchill.net &#187; apache</title>
	<atom:link href="http://burchill.net/category/apache/feed/" rel="self" type="application/rss+xml" />
	<link>http://burchill.net</link>
	<description>Phil Burchill's Blog</description>
	<lastBuildDate>Wed, 03 Feb 2010 18:15:12 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Shutting down Windows</title>
		<link>http://burchill.net/2007/05/01/shutting-down-windows/</link>
		<comments>http://burchill.net/2007/05/01/shutting-down-windows/#comments</comments>
		<pubDate>Tue, 01 May 2007 17:10:19 +0000</pubDate>
		<dc:creator>Phil Burchill</dc:creator>
				<category><![CDATA[Cygwin]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[apache]]></category>
		<category><![CDATA[children]]></category>

		<guid isPermaLink="false">http://burchill.net/2007/05/01/shutting-down-windows/</guid>
		<description><![CDATA[My kids like to play games on my personal laptop which happens to have WinXP Home on it.  Of course they don&#8217;t like to get off it when it&#8217;s time for dinner, bed, bathing, school, &#8230; Going in there and making them shut it down can be a challenge.
So the solution a mash-up Apache [...]]]></description>
			<content:encoded><![CDATA[<p>My kids like to play games on my personal laptop which happens to have WinXP Home on it.  Of course they don&#8217;t like to get off it when it&#8217;s time for dinner, bed, bathing, school, &#8230; Going in there and making them shut it down can be a challenge.</p>
<p>So the solution a mash-up Apache and psshutdown now <a title="Sysinternals" href="http://www.microsoft.com/technet/sysinternals/default.mspx">available</a> from Microsoft.  My apache was installed through <a title="Cygwin" href="http://www.cygwin.com">cygwin</a> so I have all the shell powers available for my cgi scripts.<br />
Just make  some cgi scripts and off we go.</p>
<p>You will need to make a dummy script to accept the licence using the /accepteula switch which needs to be run once or the scripts will just all fail.</p>
<p>I added the sysinternals tools to my system environment path so they will get picked up without addng the path.</p>
<p>Then the following script is dropped into</p>
<p>/srv/www/cgi-bin/shutdown</p>
<p>#!/bin/sh</p>
<p># disable filename globbing<br />
set -f</p>
<p>echo &#8220;Content-type: text/plain; charset=iso-8859-1&#8243;<br />
echo<br />
echo Force shutdown of computer<br />
echo</p>
<p>psshutdown -kf</p>
<p>I also set up a static IP address for the laptop.</p>
<p>Now I just put a bookmark in my browser http://192.168.1.199/cgi-bin/shutdown and clicking on this shuts that laptop down without any arguments.</p>
<p>I have Wi-Fi capable mobile phone so put the bookmark in there and I can easily shut it down from  there too, which is really handy as I&#8217;m not always in front of a computer screen.</p>
]]></content:encoded>
			<wfw:commentRss>http://burchill.net/2007/05/01/shutting-down-windows/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
