I'm working through troubleshooting a problem on my laptop, and I've noticed something odd - my COMSPEC environment variable has two values.
Output from typing SET at a command prompt:
ComSpec=%SystemRoot%\system32\cmd.exe;C:\Windows\SysWOW64\cmd.exe
Is this valid?
I've found a bunch of references like this one that seem to indicate that it should have only one value, but nothing definitive.
Answer
Nothing definitive, but to me it doesn't make sense and I would consider it an error. The purpose of the variable was to identity the command interpreter. (Emphasis mine). In the event of a user having several command interpreters, I would expect it to identity the default one.
Suppose you did have two entries in your comspec, what would you want to happen?
The first one is used and the second is ignored. If so, then what is the point of the second one?
It runs both shells. If so, then the logical consequence of this is that each routine is run twice which will certainly cause problems.
It runs neither, which is also cause problems.
What I would suspect would happen is sometimes 1) and sometimes 3).
No comments:
Post a Comment