How to fix ShellExecuteEx file not found error

Questions about Wine on Linux
Locked
PandaKingWineHQ
Newbie
Newbie
Posts: 3
Joined: Mon Apr 03, 2023 2:39 pm

How to fix ShellExecuteEx file not found error

Post by PandaKingWineHQ »

So, I'm on a Chromebook with Debain 11 Bullseye, and I've been trying to use Wine. However, when I try to run most apps with the command "wine (filename).exe" it says "ShellExecuteEx failed: File not found." Please Help.
jkfloris
Level 12
Level 12
Posts: 3201
Joined: Thu Aug 14, 2014 10:10 am

Re: How to fix ShellExecuteEx file not found error

Post by jkfloris »

You must first go to the directory where filename.exe is located.
For example, if you downloaded game.exe into your Downloads folder, the command becomes:

Code: Select all

cd ~/Downloads
wine game.exe
If you prefer a graphical interface, you could use

Code: Select all

wine explorer
Now you can browse to your file and open it with a double click.
You can find your own files in: C:\users\<username> and Z:\home\<username>
PandaKingWineHQ
Newbie
Newbie
Posts: 3
Joined: Mon Apr 03, 2023 2:39 pm

Re: How to fix ShellExecuteEx file not found error

Post by PandaKingWineHQ »

jkfloris wrote: Wed Apr 05, 2023 10:34 am You must first go to the directory where filename.exe is located.
For example, if you downloaded game.exe into your Downloads folder, the command becomes:

Code: Select all

cd ~/Downloads
wine game.exe
If you prefer a graphical interface, you could use

Code: Select all

wine explorer
Now you can browse to your file and open it with a double click.
You can find your own files in: C:\users\<username> and Z:\home\<username>
When I enter the command it says -bash: cd: too many arguments
jkfloris
Level 12
Level 12
Posts: 3201
Joined: Thu Aug 14, 2014 10:10 am

Re: How to fix ShellExecuteEx file not found error

Post by jkfloris »

If there is a space (or some other weird character) in the name, put the directory in quotes, or use a backslash.

Code: Select all

cd "a directory/with spaces/in the name"
# or
cd a\ directory/with\ spaces/in\ the\ name
Tip: Press the TAB key to auto-complete the path.
For example: Run the file "Cool Game.exe" located in the "~/Download/New Games" folder
What you type:
‎ ‎ cd ~/Dow<TAB>
This is now automatically completed to:
‎ ‎ cd ~/Downloads/
Continue the path name:
‎ ‎ cd ~/Downloads/New<TAB>
‎ ‎ cd ~/Downloads/New\ Games/
Start the program with Wine:
‎ ‎ wine "Cool Game.exe"
PandaKingWineHQ
Newbie
Newbie
Posts: 3
Joined: Mon Apr 03, 2023 2:39 pm

Re: How to fix ShellExecuteEx file not found error

Post by PandaKingWineHQ »

jkfloris wrote: Thu Apr 06, 2023 6:56 am If there is a space (or some other weird character) in the name, put the directory in quotes, or use a backslash.

Code: Select all

cd "a directory/with spaces/in the name"
# or
cd a\ directory/with\ spaces/in\ the\ name
Tip: Press the TAB key to auto-complete the path.
For example: Run the file "Cool Game.exe" located in the "~/Download/New Games" folder
What you type:
‎ ‎ cd ~/Dow<TAB>
This is now automatically completed to:
‎ ‎ cd ~/Downloads/
Continue the path name:
‎ ‎ cd ~/Downloads/New<TAB>
‎ ‎ cd ~/Downloads/New\ Games/
Start the program with Wine:
‎ ‎ wine "Cool Game.exe"
It worked, thanks.
Locked