This is to share with the list the query, response and solution to my query
to the list about "error 193" that started In late September.
The exchange did not appear on the Stata list because some of the text
forwarded to me was "copied text" that was formatted. I was unable to clean
it and my message was rejected by the Stata list server. My emailer is set
to send plain text by default, but also to allow formatted text to be
included . In retrospect, I should have dumped the entire message in the
text editor, then copied it back to the email program.
Err 193
We noted that the following command would work on all of our Windows XP Pro
SP2 machines except one.
On that one it produced a Stata error 193 message. The problem was that
Stata doesn't have an error 193 message.
Alan Riley found the solution to the problem of getting the command to
work. He suggested:
`"winexec "c:/Program Files/TextPad 4/TextPad""'
As to why we had the problem, he wrote,
"The one thing that is for sure is that on the machine with the problem,
CreateProcess() is resulting in a Microsoft error "193" even when being
passed the exact same arguments as CreateProcess() on your machine. This
must mean that some system DLL is somehow different on the machine with
the problem. It is hard to say whether it should be considered a feature
or a bug in the CreateProcess() call. Given the ambiguity that can
occur without the quotes, I am leaning toward thinking of it as a feature
even though it is getting in your way."
As to the question regarding "what does error 193 mean, anyway," he replied,
Stata really shouldn't be showing you that number since it isn't
a Stata return code. It would be better if Stata returned something
like "r(199)" for "unrecognized command" with some additional information
about the Microsoft error that is returned. According to Microsoft
documentation, an error code of 193 corresponds to
ERROR_BAD_EXE_FORMAT
with associated error text of
is not a valid Win32 application
Given that the path being used was
c:/Program Files/TextPad 4/TextPad
my final guess is that perhaps there is a directory on the system
in question named
c:/Program Files/TextPad/
and therefore CreateProcess() tried to execute it instead of
c:/Program Files/TextPad 4/TextPad
Thank to Alan Riley!
Fred Wolfe
Fred Wolfe
National Data Bank for Rheumatic Diseases
Wichita, Kansas
Tel (316) 263-2125 Fax (316) 263-0761 [email protected]