Monad A.K.A. Microsoft Command Shell

I've finally got some time to start playing with Monad (Microsoft's new command shell). If you are interested the Monad blog has links to download Monad beta2.

I have been using it for about a week now and the biggest hurdle has been getting my shell environment setup properly (i.e. mainly my environment variables and my doskey macros). Setting up the environment through .bat files is one of the backwards compatibility issues of Monad according to this tech chat. It is an issue because Monad does NOT interpret .bat files it just passes them to cmd.exe, so any environment variables that get set by a .bat file are not persisted.

In order to get around the environment variable problem I just start cmd.exe like I normally do but now at the end of my startup script I make a call to msh.exe. Since msh.exe is child process of cmd.exe it inherits all the environment variables.

Now the other major hurdle for me was to get all my doskey macros up and running under Monad. At first I thought I could just translate each doskey macro into a Monad alias. However, a Monad alias can only reference a cmdlet ;(. After reading some of the Monad documentation I found that the preferred way to do this is to create functions for each doskey macro.  I thought it would be interesting (and educational) for me to create a Monad script to translate my doskey macro files into Monad functions. I've got my script working pretty well and as so as I clean it up a little I will post it for all to use.

With these two hurdles out of the way I can now use Monad as my primary command shell. Stay tune I plan on posting more about Monad and my experiences using it.

[Cross posted on my personal blog]

No Comments