I am a newbie but I didn't know you can run .ASM code files directly in CMD as the file is just source code. My understanding is that you need to assemble your code with an assembler such as MASM, MASM32, TASM, NASM, or FASM. Once your code file is assembled you can run it by typing just the base name (i.e. no extension). Based on your memory model it may be a .COM (tiny model only) or a .EXE (all other models).
As far as it loading in VC is most likely due to the extension (.asm) being associated with that application. Of course, when it loads in VC it will just display the file because it is just a source code file. Source code files are not directly executable. They must be transformed in an executable format.
Any of you code gurus out there correct me if I'm wrong with what I said here...