I have written a batch file as seen below to pass the PATH, PATHEXTS, and the CD environment variables to my java program. All works fine when I run it from command line EXCEPT when I run it from the root direcotry of C:\
I took out the env variables and added them one by one to see which one was giving me the problem, it turns out the CD I'm passing is giving me a problem, but again only when I run it from C:\ if I'm in any other directory I have no problem. The error that is encountered is the USAGE for the java command being displayed. The following is the batch file I'm using, very simple:

@ECHO off
java -DPATH="%PATH%" -DPATHEXT="%PATHEXT%" -DCD="%CD%" -classpath C:\WINNT\SYSTEM32 HelloWorld %1