Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

It often happens that I develop multiple different projects at once, so I need a solution to switch from one environment to another.

I have created batch files to do the job but as this thing grows, I'll soon need something better.

Some things I do are:

  • Map drives
  • Launch applications
  • Load test databases
  • Set environment variables
  • etc.

Any suggestions on that?

Edited: I want to unify the development process in some way. We use VS, Eclipse, Notepad++ or what ever the developer needs. The goal is to be able to load a project in any windows machine without having compiling or other issues.


  • The solution might need to reference files, sdk folders, test data paths or other stuff. To solve this: I have mapped the code to a drive. The project doesn't need to know whether the dev is using c:\dev or c:\programming folders (user choice). They only need to map their coding folder to a drive (lets say W:) every file of the solution is under W:

  • Another problem is the SDKs. An sdk can be in c:\programfiles\Microsoft sdks\etc.. or in c:\programfiles x86\Microsoft sdks\etc.. Those Sdks should also need mapping to a standard folder that the solution knows.

Another thing is that we want services running (apache lets say) if we develop a website. We don't want this to run all the time.

The solution so far is to distribute batch files that the developer edits once in order to match their paths to the solutions and they run the batch before they start their new task.

I am thinking on developing a app that will set the environment as desired. Preconfigured sets that are distributed. The developer executes them in order to set the enviromnent as desired.

I hope to be clear now on the problem. Any suggestions on doing that in a better way?

share|improve this question
it ain't clear what those environments are: IDEs? Or whole operating systems? –  ZJR Aug 27 '11 at 20:09
I've edited your post to help people understand the question better. –  Jon Purdy Aug 27 '11 at 20:13
...setting up multiple user accounts would help? –  ZJR Aug 27 '11 at 21:00
Can't you find a way to reduce the number of switches ? And can you give concrete examples ? –  Jonathan Merlet Aug 27 '11 at 21:20
add comment

3 Answers

up vote 3 down vote accepted

Ask yourself: why do your projects need different environments? Can't you launch your development tools for two projects at once? That means:

  • Map drives: if you project need a specific drive mapping, it seems to have an awful design flaw

  • Launch applications: should be possible in parallel (main memory is cheap, if that's your problem)

  • Load test databases: same as "Launch applications"

  • set environment variables: can't this be done in parallel for both projects? Any collisions here?

So switching between those two projects becomes very simple after that.

If you really need separated environments, try using virtualization. So you don't have to "load your test databases" or "launch your applications" - just freeze your virtual machine when you end your work and restart it later, having the complete environment reset to the previuos state at once, without any batch scripts.

EDIT: seems you have changed your original question to "how do I manage different environments of different developers". That's a different question. My suggestion:

  • avoid absolute paths in your build process whereever possible - each project should have a single root folder after checking it out from your source control, and it should make no difference for the build process where this root folder lies. Avoid any need for a special drive mapping.

  • try to convince your team that every tool or SDK you are using will be installed in the same folder on each workstation. If that is not possible, try to build some auto-detection into your build scripts for finding the installation folder and setting environment variables appropriately

  • if you can't solve your problem by some simple batch scripts, there seems too much diversity between the different developer environments - solve that first before introducing another complex element like a full-fledged application instead of those scripts.

share|improve this answer
add comment

Many people (ok, the vi and emacs people) cope with that by using the same editor, with the same config, on everything from their PC to their iPhone, to their Toaster.

share|improve this answer
In terms of Emacs that's not even a joke: gamma-level.com/iphoneos/ports/emacs But well, these guys just stick to their OS. –  Ivo Wetzel Aug 27 '11 at 20:14
add comment

Sounds like you should have a look at virtual machines and simply have one per project. Then you can separate your projects completely, and you can have several projects open at one time.

share|improve this answer
thanks for suggesting VMs. This can do the job but since each developer is free to use their specific applications, you cannot force them to change. It will reduce their productivity. I know a person that uses "total commander". Everybody should use their tools. –  Odys Aug 29 '11 at 15:06
Each developer is responsible for setting up their own VM for a given project. –  user1249 Aug 29 '11 at 15:21
That is exactly what we want to avoid. Currently I am developing a tool that will be applying the desired configuration. Do you know if such tools exist? –  Odys Aug 30 '11 at 8:14
No, not if you have all kinds of fun things with paths, drives, IDEs. We just use Eclipse and pull out a suitable workspace from our SCM. –  user1249 Aug 30 '11 at 8:45
I used to maintain legacy software for which each version needed different ActiveX controls to be installed. Originally I had removable hard drives but Virtual Machines revolutionised my development process and allowed me to completely avoid dll hell all for the price of a few Windows licenses. –  Mark Booth Aug 31 '11 at 15:25
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.