[Wine]Problem calling executable with document as argument
motub at planet.nl
Thu Aug 25 10:13:30 CDT 2005
Ubiratã Silva schreef:
> Hello all,
> I'm performing some tests with Wine, since we have only one Windows
> server in our network, used for specific purposes.
> One of the services which I intend to migrate to Linux/Wine is called
> "SIAFI Gerencial", which runs EDM Client to update a local database
> from a remote database.
> Here's the deal. I've copied all EDM files to my desktop to perform the testing.
> If I run the application the following way:
> wine EDMCONSW.EXE
> it runs fine. However, executing it this way requires me to select
> manually the connection file , which is CONNECT.EXT, in an
> Explorer-like interface .
> If I run it exactly the way it is in my Windows box, which is:
> wine EDMCONSW.EXE CONNECT.EXT
> (using the filename as argument, exactly as in Windows box)
> I get an error "wine: cannot determine executable type" for CONNECT.EXT .
> It seems that Wine is attempting to run CONNECT.EXT, which I passed as
> an argument, as another executable file, however, it's a document file
> which EDMCONSW.EXE has to call.
> Other alternatives attempted:
> - use wine to run a batch file which calls "EDMCONSW.EXE CONNECT.EXT"
> (which works OK in the windows box, the result was the same error, for
> atualiza.bat (it does not seem to recognize batch files as
Instead of running it as a batch file called by wine, why not run it as
a linux script that calls wine?
This is the standard template I use for many applications that need some
sort of special handling to be run in a single maneuver (although the
special handling the type of apps I run is usually that the app must be
started from the installation directory, making a script necessary if
you want to create a destop icon or panel entry to start the app):
This simple text file is then named wrar_start.sh, made execuatable, and
then can be run as
And it will start WinRAR, in this case.
The crucial thing here (aside from the ability to now run the app with a
single command) is the switching to the application directory before
calling the application with Wine.
I cannot tell you how many applications that fail to run properly when
run perfectly well when run with
The other thing I'm wondering is whether the application has any
available command-line switch to distinguish the argument *as* an
argument (the fact that Windows recognizes CONNECT.EXT as an argument
does not necessarily mean that such an explicit switch does not exist,
but only that the developers of the program or of Windows may have
'hacked around it', so that use of such a switch is not visible to the
user. But any such hack would not be known by Wine).
If that was the case, it would suggest that the *.EXT file extension is
registered as a document type associated with the application (just as
*.psd is registered as a document type to Photoshop, and *.mov is
registered as a document type to Quicktime). That sort of thing is
normally done by the Registry, and since you copied just the application
files, it's quite possible that Wine has no way of knowing wtf :) an
*.EXT file is, assumes it's an executable (since that's what Wine is
designed to run), and gets confused (understandably).
To test this, I would suggest that you either:
1) Export the registry entries from the Windows box and import them into
the Wine registry (wine regedit), editing them as necessary to correct
2) install the program explicitly with Wine (which, if successful, will
write the entries to the Wine registry during the course of installation).
Hope this is in some way helpful, I know nothing about this specific
application, or database management in general, so I could be totally
More information about the wine-users