blogs.conchango.com

welcome to the conchango blogging site
Welcome to blogs.conchango.com Sign in | Join | Help
in Search

James Simmonds' Blog

Now can I have my dog back...

Sending MSN IM messages from the Command Line

As part of my education on Continuous Integration and automated builds from the ground up I've been playing with CruiseControl & SDCBuild. As a consequence the project I'm working on has a slick automated build process with unit tests being run etc...I've not got as far as getting CruiseControl and code coverage in yet but it's early days and I've got some great help on tap from Howard.

I wanted to add a setup project to the .NET solution so yesterday evening I went to add the new setup project and the solution file was checked out...and the developer had left the office! Grrr!

It got me thinking - if I could MSN the guys on the project with messages at a scheduled time (eg: 17:30..."Check your code in!") and also be able to send them build progress messages from SDC scripts it would be cool! So I wrote a little utility application to do this and you can download SendMSN here (Now hosted on ProjectDistributor.NET, click the 'Source' hyperlink). It's a .NET console app that you can call from scripts/batchfiles/cmdline to send a message to a multiple set of MSN recipients. It's a bit rough and ready but it works ok. The full source is there and I'd recommend reading the ReadMe.txt file in the documents folder for instructions and more information.

I'd be interested if you find this useful and in what context it helps you? Me, I'm going to schedule it on the dev server to nag my team into checking in code before they go home for the day, and just so it targets only the offending developers I'm going to write a little console app to run a VSS status report, parse it for names with files checked out and fire off a message to them via SendMSN!!

Enjoy!

Update: I've changed the code to provide more robust cmdline handling, hopefully won't crash if you stray from the happy path (badly formed cmdline args!). Same download - use the link above.

Update: Finally amended the download link above to point to my ProjectDistributor.NET space

Published 24 November 2004 15:06 by james.simmonds

Comments

 

james.simmonds said:

Very cool... And thanks for posting the source too.

I can see using this both in some build batch scripts but also from legacy services where command line execution is the remote code execution option easily available (like SQL Server 2K).

Thanks again for taking the time to post this.
November 24, 2004 16:52
 

TrackBack said:

November 24, 2004 18:37
 

TrackBack said:

November 25, 2004 00:13
 

TrackBack said:

November 25, 2004 09:59
 

james.simmonds said:

This looks great. Question though... If someone is in the middle of making a change isn't it better that they leave the file checked out rather than checking in a broken file and breaking the build?
November 26, 2004 00:10
 

TrackBack said:

November 26, 2004 00:29
 

james.simmonds said:

Thanks, and I agree absolutely...Our first reminder popped up today at 17:30 on the dot with the message "Please ensure that project and solution files are checked in if possible! :)". Obviously we don't want partial code that breaks the build so it's not mandatory to check in, just a reminder really - sometimes even the best developers have a little brain fade and there usually isn't a reason to hang onto a project or solution file for long.

This is the first and most obvious use I've put this to so far...tonight I've been looking at how I can correlate failed unit tests to a particular developer. And I would love to modify the SDCBuild <email> command to a more generic <notify method="sendmsn".../> command so that failed builds can be flagged ASAP via MSN rather then email - this would work well in a continuous integration environment. In this case the instant message would contain a link to the build output file for inspection.

Do let me know if you use the utility and how you are using it - I'm interested to see other ways it could be employed!
November 26, 2004 01:01
 

james.simmonds said:

Well some of the places I'm considering using it are:

1. Notify backup operators when backups are done so tapes can be changed

2. Notifying people when bugs have been assigned to them from bug tracking
November 26, 2004 07:06
 

james.simmonds said:

way cool man. Very nice.
November 26, 2004 12:55
 

james.simmonds said:

James, like the util and text msg about checking in, I think it should be manditory though to checkin over night :-)
November 29, 2004 14:52
 

TrackBack said:

December 2, 2004 18:01
 

TrackBack said:

December 2, 2004 18:34
 

TrackBack said:

December 3, 2004 20:14
 

james.simmonds said:

Love the app and thank you for posting the code, too.
December 3, 2004 20:43
 

TrackBack said:

December 5, 2004 05:12
 

TrackBack said:

December 5, 2004 05:13
 

TrackBack said:

December 7, 2004 14:52
 

james.simmonds said:

You better use a special MSN account for the purpose of annoying people, otherwise all your colleagues will block your own MSN account after a couple of days :)
December 7, 2004 15:09
 

TrackBack said:

December 7, 2004 15:15
 

james.simmonds said:

COOOOOL!!!
December 8, 2004 00:18
 

TrackBack said:

December 8, 2004 09:11
 

james.simmonds said:

This is a great idea... i plan to use it as you suggest, but also for our virtual server lab... we have a distributed team (world-wide) and use MS Virtual Server to host centralized development labs. At the least-used time possible, we have an automated backup process that saves-state on all running VMs, backs up the vhds/vmcs and then starts them all back up... it'd be great to send out a "warning" reminder just before this process kicks off just in case someone is playing the night owl.... this tool is a great idea...
December 10, 2004 12:35
 

james.simmonds said:

The app seems to fail if you call it using a UNC path. I have an application that will only call command lines using UNC paths. Any ideas on how to get it to work with UNC paths?

Thanks
December 21, 2004 17:15
 

james.simmonds said:

nevermind... I found it was a security problem in .net. I just need to set it to full trust. Thanks for a great tool!
December 21, 2004 17:19
 

james.simmonds said:

This is great ideia, however I wasn't able to make work. Any windows version or language restrictions???
Any help is welcome.
Thanks.
January 8, 2005 19:51
 

james.simmonds said:

Hey try to im me
January 9, 2005 04:48
 

james.simmonds said:

Hey, cool app. So when is the linux version gonna be developed, rather than this M$ .net version :)

Somebody may be able to help with this problem im having. The corporate Nazis have blocked the use of MSN messneger (i beleive with great difficulty, as msn messenger seems to use port 80 when you block the original port... i see M$ aint that st00pid afterall) i think in the end they had to block all packets with hotmail, msn and the like in the headers . I have a feeling that this app could be used somehow to circumvent this problem. Any ideas? Can u configure it to resolve the IP's of the domainnames and then send the packet data with IP's only?
January 13, 2005 13:05
 

james.simmonds said:

i want to get on to hotmail but the site is filtered
January 19, 2005 08:41
 

james.simmonds said:

Thanks, ill look into that.
January 19, 2005 12:19
 

TrackBack said:

Agile Development Methods
February 10, 2005 02:57
 

james.simmonds said:

Excelent!
I was just looking for something like this!.
thanks!
April 2, 2005 22:57
 

TrackBack said:

April 30, 2005 19:10
 

TrackBack said:

April 30, 2005 19:11
 

TrackBack said:

April 30, 2005 22:13
 

Howard van Rooijen's Blog said:

Here is the slide deck I presented at the Microsoft Architect Forum yesterday. I've included the notes...
July 3, 2005 18:09
 

Murat Uysal said:

September 5, 2005 20:52
 

Murat Uysal said:

September 5, 2005 21:16
 

enlargement said:

penis enlargement

November 27, 2006 05:51
 

babes sex cams said:

Sending MSN IM messages from the Command Line

August 9, 2007 13:34
 

winsome said:

This is a truly awesome piece of software, and is something I was looking for.  I'm fooling with the source, although my coding skills are weak.  

I'd like to upload outgoing MSN messages from a legacy OS to SendMSN.  So, I was wondering if it would be possible to modify the source to make it act as a server:

- constantly poll a folder for certain file names (eg. anything with a .SMS extension - 12345678.sms)

   - the .SMS file would contain a single line of text, namely SendMSN parameters (eg. /m:"Check your code in now!" /r:dev1@foobar.com)

- invoke SendMSN to send a message

- delete the file in the folder if successful

- rinse, cycle, repeat

Any suggestions or assistance would be immensely appreciated.

August 10, 2007 18:45
 

diazepam said:

wui eju

August 16, 2007 22:52
 

viagra said:

ecuip uva

August 17, 2007 10:20
 

fast weight loss diets supplements said:

Thank you. weight-loss-pages.com

October 9, 2007 02:05
 

aLTeReGo said:

Any chance of getting a compiled binary so those of us without .NET Studio can use this useful program?

July 19, 2008 03:46
Anonymous comments are disabled
Powered by Community Server (Personal Edition), by Telligent Systems