Just when you think that Windows 2003 should have solve some of the legacy issues like long folder names that used to plague the NT world, you accidentally stumble into an issue you thought could only exists in the NT world.
I had a service which I wanted to restart, but it refused to started, telling me “%1 Is Not a Valid Win32 Application”. I know of this probem before in the NT world, this was because somehow the services could execute an EXE because it could not recognise “c:\program files\xxx\xxx”. One of the workarounds I did the last time was to change this path to “c:\progra~1\xxx\xxx” and it works, of course.
But I was still puzzle why a W2K3 machine would behave like this suddenly. Anyway, I found that that I have ran a batch script previous which redirected data into c:\program files\xxxx\xxx.txt file. This don’t work in the batch file if you don’t surround this with a quotes and it created a file call “Program” in C:\ instead.
Apparent the engine that evokes services will not recognise a valid C:\program file\ path if a file called “program” is in C:\. Yes, deleting the file resolves my problem, but I am still baffled why Windows 2003 still cannot interpret a space in the folder path properly after all these years.
Here is the KB: http://support.microsoft.com/kb/812486/en-us