At work, I use a simple batch file to build the latest version of the database. Well, I could never run said batch file on my Windows 2003 Server install – it would fail saying that “‘date /t’ is not recognized as an internal or external command, operable program or batch file.” This file worked great for everybody else, including one of the other developers who was also running Win2k3. Totally frustrated by this problem, I wrote a copy of the batch file (since it’s under source control) for my own usage that built up the parameters manually instead of using the date command. However, this copy requires constant hand holding and updating to work… so, I dug around a while on Google. I couldn’t find anything specific, so I remoted into another Win2k3 machine and started a stare-and-compare session. I noticed that my “ComSpec” environment variable was different.. hmm. Here’s what I had:
ComSpec=%SystemRoot%\system32\cmd.exe /k cd \ && title CMD
I updated it to:
ComSpec=%SystemRoot%\system32\cmd.exe
No more problems!