Yes, it's the old magic disappearing dos box... I went through that
years ago when I first picked up perl, and recently repeated it when I
decided to learn Ruby.
In the hopes of making it easier for other windows users to get up to
speed, I've posted some suggestions for setting up WinXP as a Ruby
friendly environment.
For now, it covers:
Customizing a command prompt for testing
Fixing the file text search on WinXP
Adding Ruby to your path
Making ruby scripts executable by name
The write ups are written at a beginner level, but some may be useful
for more advanced users. You can read them here:
http://www.rubygarden.org/ruby?RubyOnWinXP
Please let me know if you see any errors, and feel free to add your tips.
I'm using the oneclick installer and it already sets .rb files to be
automatically ran. I also noticed it sets another thing beside what
you mention.
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.RB;.RBW
Also, from the cmd /? output, there is another (probably more cleaner)
way of setting startup options for every shell. Since if you start a
shell from some other app that doesn' use your shortcut you won't get
the environment you are used to, this probably covers more cases.
...
If /D was NOT specified on the command line, then when CMD.EXE starts, it
looks for the following REG_SZ/REG_EXPAND_SZ registry variables, and if
either or both are present, they are executed first.
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\AutoRun
and/or
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\AutoRun
...
But, I actually hate the cmd.exe and I use the unxutils package from:
http://unxutils.sourceforge.net/
and instead of the sh that comes with it i use the one from:
http://winbash.tigris.org/servlets/ProjectDocumentList
Besides being bash, this also has the advantge that it works if
started on a UNC path, where cmd refuses to start unless you map the
path to a drive.
If you're feeling adventurous you can set the %COMSPEC% env var to
point to bash.exe instead of cmd.exe, but be prepared for some(a lot)
of applications crashing or not working as expected because of shell
escaping/spawning differences.
Also, as a speed enhancer, I use the wonderful total commander from
http://www.ghisler.com/ . If you are stuck with explorer.exe, there
are registry settings or apps that allow starting a shell from the
current directory or add a split with a shell in it below the files.