How to make WINE open an exe-file only by the file name omitting the extension EXE?

I am running linux Manjaro, Xfce and I have application Simplicity Studio IDE from Silicon Labs, that uses WINE to build projects. It worked well in KDE, but after one crush I reinstalled clean the entire system and used Xfce instead of KDE. After that, WINE integration with the IDE stopped working with the error:

wine: failed to open “/home/username/SimplicityStudio_v5/developer/toolchains/keil_8051/9.60/BIN/C51”: c0000135
(the file is C51.EXE)
The Simplicity Studio IDE omits the extension EXE at the end and this is the cause of the error.
It didn’t cause this problem before in KDE, but now WINE can’t find the file without extension.

Is it possible to make WINE open an exe-file only by its name, but omitting the extension EXE?

Thank you.

Hello @Aizeq :wink:

I really don’t think that this the root of the problem. Since you try to start the program in wine, it doesn’t matter which suffix is there. It just executes any binary if possible.

This status code : c0000135 is the problem. If i have to guess, then it doesn’t find the DLL.

I believe you have just copy the folder to you new installation and did not perform a re-initialization:

WINEPREFIX=/path/to/prefix wineboot --update

https://wiki.winehq.org/Wineboot

Hi megavolt,

When I did clean Manjaro Xfce reinstall, I reinstalled Simplicity Studio IDE as well, so ~/.wine was updated. Nevertheless, I followed your advice and updated it again with wineboot as you directed, and WINE updated the configuration:

[…]$ WINEPREFIX=~/.wine wineboot --update
wine: configuration in L"~/.wine" has been updated.

I tried IDE builder again and it shows the same error :
wine: failed to open “~/SimplicityStudio_v5/developer/toolchains/keil_8051/9.60/BIN/C51”: c0000135

Then I tried to start it from the console:
[…]$ wine “/home/username/SimplicityStudio_v5/developer/toolchains/keil_8051/9.60/BIN/C51”
MESA-INTEL: warning: Performance support disabled, consider sysctl dev.i915.perf_stream_paranoid=0

wine: failed to open “/home/username/SimplicityStudio_v5/developer/toolchains/keil_8051/9.60/BIN/C51”: c0000135

The problem with the error : …dev.i915.perf_stream_paranoid = 0 is solved by:
[…]$ sudo sysctl -w dev.i915.perf_stream_paranoid=0

Then I try to open the file again:
[…]$ wine “/home/username/SimplicityStudio_v5/developer/toolchains/keil_8051/9.60/BIN/C51”
wine: failed to open “/home/username/SimplicityStudio_v5/developer/toolchains/keil_8051/9.60/BIN/C51”: c0000135

No luck opening the file C51.exe without the extension EXE. If I put extension back into the line, WINE finds the file. So, the libraries and ./wine folder is not a problem, I think.

Thank you

ok @Aizeq , I tested it myself with a simple exe. I used putty.exe. There it doesn’t matter if i write wine putty or wine putty.exe. Both methods work. This exe only uses linked system DLLs.

So myself, i cant reproduce this problem, i tested it also on a clean install with XFCE in Virtualbox. Both, with and without “.exe”-suffix, works normal.

So really… c0000135 has to do with DLLs which are linked, but cannot be found. Since you coded it yourself, I assume there is a misbehavior in a function or how you linked them, but here is not the place to solve this.

Thank you @megavolt.

I also tried wine with different Windows applications that work perfectly.

[…]$ wine “/home/username/Programs/QucsStudio/bin/qucs.exe”
0024:fixme:heap:RtlSetHeapInformation 00000000 1 00000000 0 stub
0024:fixme:win:FlashWindowEx 0021F4D4 - semi-stub
0024:fixme:msvcrt:__clean_type_info_names_internal (657BFC7C) stub
0024:fixme:msvcrt:__clean_type_info_names_internal (6726B1FC) stub
(Aplication was opened in wine.)

Tried without extension:
[…]$ wine “/home/username/Programs/QucsStudio/bin/qucs”
wine: failed to open “/home/username/Programs/QucsStudio/bin/qucs”: c0000135

Another application that works in wine:
[…]$ wine “/home/username/Programs/Femm/femm42bin_x64_21Apr2019.exe”
0104:fixme:win:DisableProcessWindowsGhosting : stub
0104:fixme:graphics:ShutdownBlockReasonDestroy (0001007C): stub
0104:fixme:graphics:ShutdownBlockReasonCreate (0001007C, L"Installing"): stub
0104:fixme:rstrtmgr:RmStartSession 0049F3FC, 0, 0049F400 stub!
(Application was opened in wine)

Tried without extension:
[…]$ wine “/home/username/Programs/Femm/femm42bin_x64_21Apr2019”
wine: failed to open “/home/username/Programs/Femm/femm42bin_x64_21Apr2019”: c0000135

Thank you for your help

@Aizeq

  1. Did you try to delete the prefix ~/.wine and let wine recreate it?
  2. Did you try to run it without surrounded " ?
  3. Did you try to run the binary within the folder with wine binary_file?

Do as you say:

1.Deleted prefix `~/.wine and recreated it with
[…]$ WINEPREFIX=~/.wine winecfg

  1. Tried to run without “”

[…]$ wine /home/username/Programs/QucsStudio/bin/qucs.exe
0024:fixme:heap:RtlSetHeapInformation 00000000 1 00000000 0 stub
0024:fixme:win:FlashWindowEx 0021F4D4 - semi-stub
0024:fixme:msvcrt:__clean_type_info_names_internal (657BFC7C) stub
0024:fixme:msvcrt:__clean_type_info_names_internal (6726B1FC) stub
(opened perfectly)

Tried without extension:
[…]$ wine /home/username/Programs/QucsStudio/bin/qucs
wine: failed to open “/home/username/Programs/QucsStudio/bin/qucs”: c0000135

  1. Opening inside the folder

[…]$ cd /home/username/Programs/QucsStudio/bin/
[… bin]$ wine qucs
0104:fixme:heap:RtlSetHeapInformation 00000000 1 00000000 0 stub
0104:fixme:win:FlashWindowEx 0021F4D4 - semi-stub
0104:fixme:msvcrt:__clean_type_info_names_internal (657BFC7C) stub
0104:fixme:msvcrt:__clean_type_info_names_internal (6726B1FC) stub

WOW!!! It opens well without the extension. Why??? What is the problem then?

It seems we are almost there.
Thank you

Interesting… i can reproduce it now:

wine "$HOME/Downloads/putty"                         
0094:err:plugplay:enumerate_new_device Unable to install a function driver for device L"WINEKEYBOARD\\vid_0000&pid_0000\\0&WINEKEYBOARD&0&1".
wine: failed to open "/home/megavolt/Downloads/putty": c0000135

If you use a path here, then wine thinks that “putty” is a directory and not a binary, thus is it can not run it.

As workaround you can set the WINEPATH:

env WINEPREFIX=$HOME/.wine WINEPATH=$HOME/Downloads wine putty

Sorry, guess I have not tested it correctly. But now I understand what you mean. I never gone through such a problem, since i never run windows apps with a full path, but rather change to that directory and then run it.

Thank you @megavolt for solving. I am very grateful .

Maybe this issue should be reported on winehq.

I guess it not a bug or sort of, but a design decision.

You can run an exe with…

  1. full path (that means also with exe suffix).
  2. relative path within the working dir and the WINEPATH variable can be used here.

I did and posted @megavolt’s solution there. I didn’t actually report, just posted it, since I opened the same thread there.

1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.