"cannot find" return code with absolute path

Open forum for end-user questions about Wine. Before asking questions, check out the Wiki as a first step.
Forum Rules
Post Reply
xantares
Newbie
Newbie
Posts: 1
Joined: Sun Jul 19, 2020 12:37 pm

"cannot find" return code with absolute path

Post by xantares » Sun Jul 19, 2020 12:44 pm

when wine is launched to run an executable file that does not exist,
it does not return a consistent error code according to the file path being absolute or relative:

$ wine zz.exe
0024:err:module:__wine_process_init L"C:\\windows\\system32\\zz.exe" not found
$ echo $?
53

$ wine /zz.exe
wine: cannot find L"/zz.exe"
$ echo $?
0

is this the expected behavior ?

jkfloris
Level 8
Level 8
Posts: 1158
Joined: Thu Aug 14, 2014 10:10 am

Re: "cannot find" return code with absolute path

Post by jkfloris » Tue Jul 21, 2020 6:24 pm

In the first situation, Wine start and tries to find the file as a built-in, but fails:

Code: Select all

WINEDEBUG=warn+all wine zz.exe

0009:warn:ntdll:NtQueryAttributesFile L"\\??\\Z:\\home\\user\\zz.exe" not found (c0000034)
0009:warn:ntdll:NtQueryAttributesFile L"\\??\\C:\\windows\\system32\\zz.exe" not found (c0000034)
0009:warn:ntdll:NtQueryAttributesFile L"\\??\\C:\\windows\\system\\zz.exe" not found (c0000034)
0009:warn:ntdll:NtQueryAttributesFile L"\\??\\C:\\windows\\zz.exe" not found (c0000034)
0009:warn:ntdll:NtQueryAttributesFile L"\\??\\C:\\windows\\system32\\zz.exe" not found (c0000034)
0009:warn:ntdll:NtQueryAttributesFile L"\\??\\C:\\windows\\zz.exe" not found (c0000034)
0009:warn:ntdll:NtQueryAttributesFile L"\\??\\C:\\windows\\system32\\wbem\\zz.exe" not found (c0000034)
0009:warn:ntdll:NtQueryAttributesFile L"\\??\\C:\\windows\\system32\\WindowsPowershell\\v1.0\\zz.exe" not found (c0000034)
...
0009:warn:ntdll:FILE_CreateFile L"\\??\\C:\\windows\\system32\\zz.exe" not found (c0000034)
0009:warn:ntdll:FILE_CreateFile L"\\??\\Z:\\usr\\lib\\wine\\..\\i386-linux-gnu\\wine\\zz.exe" not found (c0000034)
0009:warn:module:find_builtin_dll cannot find builtin library for L"zz.exe"
0009:warn:module:load_dll Failed to load module L"C:\\windows\\system32\\zz.exe"; status=c0000135
0009:err:module:__wine_process_init L"C:\\windows\\system32\\zz.exe" not found
In the second case, you specify a nonexistent file and Wine stops successful:

Code: Select all

WINEDEBUG=warn+all wine /zz.exe

0009:warn:ntdll:NtQueryAttributesFile L"\\??\\Z:\\zz.exe" not found (c0000034)
wine: cannot find '/zz.exe'

Post Reply