Sorry, that wasn't very clear.  I was trying to use gvim from `CMD.EXE` to test how it would react, say, to the ':e <filename>' with various possibilities.  You are right that because vim uses `$` for environment variables and `CMD.EXE` uses `%var%` the shell quoting wasn't the issue.