Multi-version environment on Windows

Working with command prompt on windows is messy. Working with multiple version of a language/compiler on windows is a trip to hell.

Possible workarounds are:

  • Set all the paths and add tags in names of binaries
    (stupid. You would have to remember all names or you will have to use some naming convention; still you will keep guessing).
  • Create users and set different versions in each user’s paths
    (Foolish. Then changing version will be like logging as different user).
  • Use a Customized Command Prompt
    (Elegant. Developers friendly)

How to Customize Command Prompt.

Create a file Called YOURSYSTEM-VER-cofig.bat. Where YOURSYSTEM is the name of the system you are using and VER is the version of that specific system like python-2.6-config.bat.
Now put some codes in the file. Like:

Then create a new shortcut Right click on empty space or File -> New -> Shortcut.

Create new shortcut
Create new shortcut

Then type %COMPSPEC% /K "C:pathtoyourfile" in it

shortcut
Creating shortcut

Then Rename the shortcut to a proper name.

Rename shorcut to a Proper name
Rename shorcut to a Proper name

Then click on Finish. Now Right click on the shortcut.

Command prompt shortcut
Command prompt shortcut

Select shortcut properties.

Shortcut properties
Shortcut properties

We can set the Fonts of the Command prompt.

Shortcut properties.
Shortcut properties.

We can set the color of the command prompt. like BACKGROUND, FOREGROUND.

Shortcut properties
Shortcut properties

We can even set the buffer and the screen layout of the shell window.

Shorcut properties
Shortcut properties

Example.

Costomized command prompt
Customized command prompt

Now you are ready to enjoy this very good feature.

I recommend you to keep all these files in one folder say with name config-all and with attribute as hidden.


Posted

in

by

Comments

One response to “Multi-version environment on Windows”

  1. Yagraj Avatar
    Yagraj

    hey! good article shishir.

Leave a Reply to Yagraj Cancel reply

Your email address will not be published. Required fields are marked *

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