[Wine]batch file fails, individual programs in it run

Rein Klazes rklazes at xs4all.nl
Wed Aug 25 03:56:59 CDT 2004

On Tue, 24 Aug 2004 19:31:08 -0500, you wrote:

> I posted to the list a day or two ago about a problem that I thought was
> related to a new kernel
> (http://www.winehq.org/hypermail/wine-users/2004/08/0178.html)
> As it turns out, I've discovered that I *can* run programs in Wine as
> a non-privileged user; what fails for me is calling those same programs
> from a batch file.
> To summarize what I've found:
> Suppose that 'foo.exe' is the complete text of foo.bat, and make it
> world-readable.
> 'wine foo.exe' works both for root and for others.
> 'wine start.exe foo.bat' works for root but fails for others.
> The errors look like this:
> fixme:exec:ShellExecuteExW32 flags ignored: 0x00000500
> fixme:exec:SHELL_ExecuteW Strange error set by CreateProcess: 203
> fixme:exec:SHELL_ExecuteW Strange error set by CreateProcess: 203
> Application could not be started, or no application associated with the specifi
> ed file.
> ShellExecuteEx failed: Environment variable not found
> Additionally, 'wine start.exe' with no arguments works fine for all users---it
> prints the help for start.exe. So there's no problem running start.exe; it's
> the ShellExecuteEx call in it that's failing.
> This worked (for me, at least) in 20040505, and hasn't in any release since.

For running batch files wine gets the command interpreter form the
environment variable COMSPEC. Wine comes with wcmd. Try:

COMSPEC=/usr/local/bin/wcmd wine start foo.bat

(adjust the path if needed)

or user wcmd directly:

wcmd /c foo.bat

I am not sure whether having to specify COMSPEC is a feature or a bug.
Perhaps it is related to the other configuration changes that "happened"

Rein Klazes
rklazes at xs4all.nl

More information about the wine-users mailing list