In my company, the development team uses a .bat file (kept in the VCS) to set approximately 30 environment variables. This sets the general enviroment for then building with ant or running the build products. Separately, I am setting up TeamCity to do complete builds and run comprehensive tests. I have manually configured all of the environment variables into the TeamCity project settings. But, the team is frequently changing the .bat file, so it is a problem to keep the TeamCity project environment variables up to date.
Is it possible to have a build step that can set environment variables that will then be used by the rest of the build steps?