Primordial Win Script

Here is one tasty little script from the pre-power shell era. Is it useful? I certainly hope so. Will it run on your W7 ? Certainly it will. So … what is this script for?

wshI have a lot of development artifacts on all my machines. This is one barely manageable ocean, of files and folders from last decades of computing. So I tend to create several substituted drives where I always keep the same kind of stuff, and where I always do the same kind of things.

For example I always develop on the (famous) X: drive. All my IDE setups, batch files and scripts, assume they are living on the drive with the same root: “X:”.

This is especially useful for team work. VSS is notorious for confusing everyone and everything. If the whole team has working folders on the same drive (yes, the X:), on each and every machine, then managing them is much more erm… manageable. Then , here we also have the backup tools and scripts, building environments etc. All in all we always need and have several important drive letters on all development workstations, and servers too.

To make that kind of a WIN desktop more manageable, I have developed this simple but mission critical script.

If no arguments are given, it simply creates X: subst drive, with the X: root mapped to wherever the script is sitting. Optionally it can receive a single argument telling it what the new drive letter should be. On any illegal substitution attempt it will just ignore you. At the end it will pop up the file explorer with the new drive as the root of the tree view. Neat.

Here is the script:

Yes this is an WSF file. Just create on your machine one empty <whatever>.wsf file, and then paste this script into it.
If you find this script usefull please feel free to “jump” into the MSDN ocean, in case you are really curious about WSF , this “funny” markup, etc …