Controlling your PC remotely using Twitter

7
Shares

In the last few days, I have found myself in a difficult situation where I would like to leave office early and there are some stuff I am doing on the computer that don’t need much of my intervention, only need a check and switch off the computer when done.(e.g. Installing some heavy antivirus)

How would you do this and you already left the office?

This might lead to leaving the computer on till the following day.



Now I thought. If I ran the command “shutdown -s -t **”, the computer might shut down before the its through. Same case applies to other auto shut Apps.

Option 2 would be the windows remote desktop connection: this requires a public IP, do some port forwarding and some good internet. This is not so secure for your PC. and its hectic too.

Option 3. Use online remote desktop controllers like Logmein. This might be a good idea but also need some fast, and I mean fast internet to do stuff on your computer.

So the only solution is think how to send a shutdown command to your computer remotely and easily. I came across a small program called “TweetMyPc” This small App checks your Twitter tweets for preset commands every minute. If your tweet is any of the preset commands, it runs the command on your computer.

Apparently, most preset commands are not working e.g. “shutdown, lock, getfile, logoff…” I am running TweetMyPc on Windows Server 2003 and think there might be some compatibility issues.

The App is friendly; you can create custom commands and point to a specific file. So I did create custom command pointing to my shutdown script.

Tweet the command name, and the computer switches off just fine.

One problem is solved. Now I don’t know if the computer is through or not. *thinking* the “screenshot” command on tweetmypc isn’t working.

I need a program to capture the screen and may be send the image via email. A command line print screen tool would help.

I got the command line App to capture the screenshot. Working too well and simple. The App is called “cmdcapture.exe”

Download the app to \windows\system32\

Create a batch file with the code “cmdcapture /f screenshot.jpg /d c:” replace screenshot.jpg with the file name you intend to use and “c:” with the path.

Create a custom command on TweetMyPc to point to your batch file, give your command a unique name. tweet that command on tweeter, wait circa 1 minute and check your path to see if your file has been saved.

Its working. Now we need an app to send us the image file. And by the way, why do we need command line tools and not GUI apps? We want to execute our apps with preset parameters so we need not intervene.

We need a combination of two apps here. One to encode the file to MIME and another to send the MIME attachment

Download Bmail and Mpack from the links “ftp://ftp.andrew.cmu.edu/pub/mpack/old/mpack15d.zip” and “http://www.beyondlogic.org/solutions/cmdlinemail/bmailv107.zip” and extract the contents of the Zip files to “…\windows\system32\”

Now add these two lines of code to our earlier created batch file on line 2 and 3 respectively.

2. mpack -s “Email Subject”  -c image/jpeg -o body.msg c:\screenshot.jpg

3. bmail -s mail.server-p 25 -t [email protected] -f [email protected] -m body.msg

On Mpack

-c specifies the octet stream file type.

-o Is the file name where the translated mime will be stored. And its followed by the file path.

On Bmail

–s will specify the SMTP server

-t email to send to

-f email to send from

-h generate headers

-m specify the mime file you created earlier on with mpack on line 2

Again tweet your custom command, after confirmation (TweetMyPc will tweet the confirmation) check your mail.

Your screenshot is there.


With the power of custom commands, there is a lot more you can do to control your pc using TweetMyPc. You just need to think an extra mile.

WAH

Shares

7 COMMENTS


  1. WOW! now thats serious geeking. Will i as the ordinary tweep/computer user be able to get though all this? Sounds fun 🙂


    • as far as you know how to download stuff you can give it a try.
      The lines of code am talking of are just simple, just paste them in notepad and save them with extension .bat


  2. @morris me too here, am surprised by the possiblities, but look at it this way, you have to be connected full time to the internet on both ends, (how many pple have an unlimited connection?) and also pray KPLC has a soft spot for you….well i think you have so much time to yourself to discover that…kudos, thats inspiring. 😀


    • @martin. on the the remote pc yes but on your current location no. only when you want to send commands.
      I am currently just tweeting using my phone. And by the way twitter supports sms but I have not tried the sms yet


  3. This sound like the cloud computing thing, and one hindrance in Kenya at the moment is KPLC. If only we can get stable power all the time, things could be much better. The sms for twitter is still on trial. The sms for twitter is perfectly working in Nigeria and Cameroon but according to @jess who works with twitter, the Kenyan version is coming soon.

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.