No, I'm afraid that it is not possible to do what you want under the circumstances that you have outlined. Executable files are treated specially (due to their ability to infect a system), so Windows will not let you just run any old file as an executable.
The PATHEXT
environment variable tells Windows what programs are "executable" and can be "run", but there are limits. Open a command-prompt and append .cos
to pathext
and try to run one of the .cos
files:
> set pathext=.cos;%pathext%
> foobar.cos
You will see that either the default "all files" program runs, or if none is configured, that the Open With dialog is presented. Why? Because Windows restricts what can be run for safty reasons. You should be able to register .cos
files as executable (like .py
, .pl
, etc.), but even then, it may not be possible since a .py
or .pl
file is actually just a document that is opened by a program, not an actual executable.
Another option might be to try to create an association whereby you tell the system that .cos
files are comfiles
. However, the quick test I just attempted did not work and Windows complained that it is not an executable file and returned access denied.
The command prompt in Windows XP is not DOS. They aren't the same thing
– phuclv – 2020-02-15T00:17:36.580You should add more details about the environment, especially about your "special environment". – Robert – 2012-03-02T17:10:19.913
Figure out a way to burn a new copy of the media. They were created in some manner. – Ramhound – 2012-03-02T17:17:55.947