Recently I came across an issue on Jenkins while building a project on Windows OS.
What was happening was that while running a build script locally in the Windows OS the building of binaries was successful, but while doing the same using Jenkins I was getting error building binaries. It was not able to take the local settings of the machine which includes various configurations of Visual Studio 2008.
Solution: After some debugging, I found out that the root cause was that I was running the Jenkins slave as a windows service. When I stopped the service and ran the .jnlp file on the slave, the build process was successfuly. Another important point I’m starting to realise about Jenkins slaves on Windows is that it is best to launch the slave via jnlp and not as a service.