I recently read an article on lifehacker that explained how to shut down windows with a text message.
Although I think this is a really cool idea, I don’t own microsoft outlook and I wanted to figure out a more portable way to go about setting up this project on my computer.
With an add-on and a few tweaks, it is possible configure this, with a portable copy of Mozilla Thunderbird.
This should take < 10 minutes to set up and configure.
Step 1 – Get thunderbird portable
Download a copy of portable thunderbird:
and extract it by running the exe.
Step 2 – Setup thunderbird & install add-on
First of all, set up an email account. I created a gmail account just for this project. Go through thunderbird’s setup process and make sure your email account is configured properly. You’ll probably need to login to your account and enable POP/IMAP settings.
Now that you have a portable, working copy of mozilla thunderbird, download this add-on:
This is what makes it all work.
To install this into the thunderbird portable folder, open ThunderbirdPortable, and go to Tools -> Add-ons and click install. Direct thunderbird to the .xpi file you downloaded and it will install the add-on.
Restart thunderbird to proceed.
Step 3 – Configure inbox
Before you can configure the options for the add-on, you’ll need to create a folder that will hold the text messages. Right click on “Inbox” and click new folder. Name this something memorable. I named mine “SMS”
Next, click Tools -> Message Filters. Here you will pick the requirements your text message must meet in order to shut down your computer. Click “New” and create a filter. Configure your filter to meet some requirements in the top box, and configure the second box to move the message into the folder you created earlier.
Step 4 – Configure add-on
Before the add-on can run, it needs a command to run. Create a batch file in the portable thunderbird program directory that contains something like this:
In my example, I’m naming it shutdown.bat
Next, open up your portable thunderbird and click on the folder you created earlier (“SMS” in my case). Then, go to Tools -> Mailbox Alert Preferences
IMPORTANT : Make sure that you have selected your folder BEFORE editing the mailbox alert preferences. Otherwise, you will end up shutting down your computer every time you receive an email.
Check the Execute a command: checkbox as I have above, and point it to the shutdown batch file. Hit OK.
To decrease the delay between the sending of the text message to the shutting down of the computer, go to Tools -> Account Settings…
click “Server Settings” on the left side under the account you will be receiving text messages on. Under the server settings part of the box, change Check for new messages every _30_ minutes to every _1_ minute.
Well done. Running this portable program will enable you to shutdown your computer from anywhere, as long as your computer is connected to the internet and you have a phone. Try it out – send a message to your email address that meets the criteria you set up in the filter. If everything works out, next time thunderbird checks for messages, it should get your SMS and shutdown.
This concludes the practical part of the guide, but, as I’m sure you’ve processed, this could potentially be used from ANY computer connected to the internet to run ANY program. This has quite a lot of potential, so I decided to see what I could whip up in a couple of minutes.
idea – run the program invisibly, in the background
This is fairly easy to set up. Download nircmd (http://www.nirsoft.net/utils/nircmd.html) and place it in your thunderbird folder. Nircmd is a really cool tool that can be configured to do quite a lot of things. Read the .chm in the zip to see all of the options. After you have placed the executable in the folder (nircmdc.exe), create another batch file.
put this in the file:
nircmdc cmdwait 5000 win hide ititle “Thunderbird”
This is a fairly simple batch file, which will open thunderbird in a new process, wait 5 seconds (for thunderbird to initialize and start up) and then hide the window. The program is still viewable in the your processes, but it isn’t viewable in the taskbar.
Now all you need to do is double click the batch file you have just created, wait a few seconds, and you will have a portable thunderbird running in the background, ready to shutdown your computer when it receives the right message.
I’m sure you can think of many more ideas to add to this, so contribute whatever you’re thinking. My apologies if I left out anything important in this guide. Please let me know if I did. If you get it working, let me know how it goes.
daedalus [ http://forums.hak5.org/index.php/topic,9019.0.html ]