Closed ringtailedfox closed 4 years ago
This actually suggests that the command itself failed. I.e. python attempted to execute
cmd.exe /C echo %USERPROFILE%
... and it returned an exit code of 1, and even if the variable in use contains spaces it still seems to work OK (at least at that point).
From a WSL bash environment, what happens when you run this?
cmd.exe /C echo %USERPROFILE%
echo $?
If that looks good, you can try actually running what is executed:
$ python 3.8
>>> import subprocess
>>> subprocess.check_output(["cmd.exe", "/C", "echo", "%USERPROFILE%"], stderr=subprocess.DEVNULL)
And see if that throws a CalledProcessError
on your system?
user@XOTICPC:~$ cmd.exe /C echo %USERPROFILE% 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:import_dll Library msvcrt.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-eventing-consumer-l1-1-1.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt.swprintf_s' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt.wcstoul' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt.iswctype' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt._ultow_s' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt.wcscpy_s' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt._wcsicmp' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt._wcstoi64' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt._ultow' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt.wcstok_s' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt._errno' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt._ui64tow_s' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt._i64tow_s' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt.wcsncpy_s' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt.wcsstr' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt.qsort_s' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt.wcsnlen' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt._stricmp' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt.strchr' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt.strrchr' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt.strstr' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt.wcsrchr' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt.strnlen' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt.wcsncmp' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt.memcpy_s' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt.towlower' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt.memmove_s' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt._wcsnicmp' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt.wcscat_s' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt.memcmp' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt.memcpy' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt.memmove' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt.memset' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt.wcscmp' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt._wcstoui64' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt.wcschr' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt._vsnwprintf_s' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt._purecall' used by L"C:\windows\system32\api-ms-win-core-crt-l2-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt._initterm_e' used by L"C:\windows\system32\api-ms-win-core-crt-l2-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt._initterm' used by L"C:\windows\system32\api-ms-win-core-crt-l2-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'msvcrt._onexit' used by L"C:\windows\system32\api-ms-win-core-crt-l2-1-0.dll" 002e:err:module:import_dll Library api-ms-win-service-core-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-service-private-l1-1-4.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-service-private-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-service-private-l1-1-3.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-service-private-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-security-base-private-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-core-registry-l1-1-1.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-core-registry-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-security-audit-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-core-pcw-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'advapi32.EventUnregister' used by L"C:\windows\system32\api-ms-win-eventing-provider-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:import_dll Library msvcrt.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-eventing-consumer-l1-1-1.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-service-core-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-service-private-l1-1-4.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-service-private-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-service-private-l1-1-3.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-service-private-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-security-base-private-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-core-registry-l1-1-1.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-core-registry-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-security-audit-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-core-pcw-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'advapi32.EventRegister' used by L"C:\windows\system32\api-ms-win-eventing-provider-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:import_dll Library msvcrt.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-eventing-consumer-l1-1-1.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-service-core-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-service-private-l1-1-4.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-service-private-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-service-private-l1-1-3.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-service-private-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-security-base-private-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-core-registry-l1-1-1.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-core-registry-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-security-audit-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-core-pcw-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'advapi32.EventActivityIdControl' used by L"C:\windows\system32\api-ms-win-eventing-provider-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:import_dll Library msvcrt.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-eventing-consumer-l1-1-1.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-service-core-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-service-private-l1-1-4.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-service-private-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-service-private-l1-1-3.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-service-private-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-security-base-private-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-core-registry-l1-1-1.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-core-registry-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-security-audit-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-core-pcw-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'advapi32.EventWriteTransfer' used by L"C:\windows\system32\api-ms-win-eventing-provider-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002e:err:module:import_dll Library msvcrt.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-eventing-consumer-l1-1-1.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-service-core-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-service-private-l1-1-4.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-service-private-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-service-private-l1-1-3.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-service-private-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-security-base-private-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-core-registry-l1-1-1.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-core-registry-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-security-audit-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:import_dll Library api-ms-win-core-pcw-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002e:err:module:find_forwarded_export module not found for forward 'advapi32.EventSetInformation' used by L"C:\windows\system32\api-ms-win-eventing-provider-l1-1-0.dll" 002e:err:module:import_dll Library api-ms-win-core-apiquery-l1-1-1.dll (which is needed by L"Z:\mnt\c\windows\system32\kernelbase.dll") not found 002e:err:module:import_dll Library kernelbase.dll (which is needed by L"C:\windows\system32\kernel32.dll") not found wine: could not load kernel32.dll, status c0000135
user@XOTICPC:~$ echo $? 1
Oops - yeah that looks like your smoking gun... Is windows misbehaving? That command should work. Try which cmd.exe
or something like that to figure out why that command is failing, because it looks like something is up with your wsl / windows installation.
Windows seems to be working properly...
user@XOTICPC:~$ which cmd.exe /mnt/c/windows/system32/cmd.exe
I did nothing to WSL or Windows lately... this doesn't make any sense...
Erm see if this gives different results:
/mnt/c/windows/system32/cmd.exe /C echo %USERPROFILE%
(Using absolute path)
I see references to wine there I wonder is it fighting with wsl or trying to intercept cmd.exe somehow (e.g. with an alias)
user@XOTICPC:~$ /mnt/c/windows/system32/cmd.exe /C echo %USERPROFILE% 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:import_dll Library msvcrt.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-eventing-consumer-l1-1-1.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt.swprintf_s' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt.wcstoul' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt.iswctype' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt._ultow_s' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt.wcscpy_s' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt._wcsicmp' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt._wcstoi64' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt._ultow' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt.wcstok_s' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt._errno' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt._ui64tow_s' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt._i64tow_s' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt.wcsncpy_s' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt.wcsstr' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt.qsort_s' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt.wcsnlen' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt._stricmp' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt.strchr' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt.strrchr' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt.strstr' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt.wcsrchr' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt.strnlen' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt.wcsncmp' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt.memcpy_s' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt.towlower' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt.memmove_s' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt._wcsnicmp' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt.wcscat_s' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt.memcmp' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt.memcpy' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt.memmove' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt.memset' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt.wcscmp' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt._wcstoui64' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt.wcschr' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt._vsnwprintf_s' used by L"C:\windows\system32\api-ms-win-core-crt-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt._purecall' used by L"C:\windows\system32\api-ms-win-core-crt-l2-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt._initterm_e' used by L"C:\windows\system32\api-ms-win-core-crt-l2-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt._initterm' used by L"C:\windows\system32\api-ms-win-core-crt-l2-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'msvcrt._onexit' used by L"C:\windows\system32\api-ms-win-core-crt-l2-1-0.dll" 002d:err:module:import_dll Library api-ms-win-service-core-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-service-private-l1-1-4.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-service-private-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-service-private-l1-1-3.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-service-private-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-security-base-private-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-core-registry-l1-1-1.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-core-registry-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-security-audit-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-core-pcw-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'advapi32.EventUnregister' used by L"C:\windows\system32\api-ms-win-eventing-provider-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:import_dll Library msvcrt.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-eventing-consumer-l1-1-1.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-service-core-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-service-private-l1-1-4.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-service-private-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-service-private-l1-1-3.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-service-private-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-security-base-private-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-core-registry-l1-1-1.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-core-registry-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-security-audit-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-core-pcw-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'advapi32.EventRegister' used by L"C:\windows\system32\api-ms-win-eventing-provider-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:import_dll Library msvcrt.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-eventing-consumer-l1-1-1.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-service-core-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-service-private-l1-1-4.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-service-private-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-service-private-l1-1-3.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-service-private-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-security-base-private-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-core-registry-l1-1-1.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-core-registry-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-security-audit-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-core-pcw-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'advapi32.EventActivityIdControl' used by L"C:\windows\system32\api-ms-win-eventing-provider-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:import_dll Library msvcrt.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-eventing-consumer-l1-1-1.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-service-core-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-service-private-l1-1-4.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-service-private-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-service-private-l1-1-3.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-service-private-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-security-base-private-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-core-registry-l1-1-1.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-core-registry-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-security-audit-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-core-pcw-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'advapi32.EventWriteTransfer' used by L"C:\windows\system32\api-ms-win-eventing-provider-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-console-l1-2-0.dll (which is needed by L"Z:\mnt\c\windows\system32\msvcrt.dll") not found 002d:err:module:import_dll Library msvcrt.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-eventing-consumer-l1-1-1.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-service-core-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-service-private-l1-1-4.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-service-private-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-service-private-l1-1-3.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-service-private-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-security-base-private-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-core-registry-l1-1-1.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-core-registry-l1-1-2.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-security-audit-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:import_dll Library api-ms-win-core-pcw-l1-1-0.dll (which is needed by L"Z:\mnt\c\windows\system32\advapi32.dll") not found 002d:err:module:find_forwarded_export module not found for forward 'advapi32.EventSetInformation' used by L"C:\windows\system32\api-ms-win-eventing-provider-l1-1-0.dll" 002d:err:module:import_dll Library api-ms-win-core-apiquery-l1-1-1.dll (which is needed by L"Z:\mnt\c\windows\system32\kernelbase.dll") not found 002d:err:module:import_dll Library kernelbase.dll (which is needed by L"C:\windows\system32\kernel32.dll") not found wine: could not load kernel32.dll, status c0000135
should I uninstall wine, reboot windows and try running wsl-windows-toolbar again?
Yeah I think so sorry it has been a long time since I have used Wine so I'm not exactly sure how its hijacking cmd.exe and associated dlls but I suspect it may be something to do with your PATH and related dll precedence
uininstalled wine and rebooted and i still have the problem...
user@XOTICPC:~$ wsl-windows-toolbar
Traceback (most recent call last):
File "/home/user/.local/bin/wsl-windows-toolbar", line 5, in
Different error code at least, what does
cmd.exe /C echo %USERPROFILE%
Say now?
user@XOTICPC:~$ cmd.exe /C echo %USERPROFILE% cmd.exe: command not found
which is total nonsense, since my system can find cmd.exe just fine... is this a paths issue in WSL2 or Windows?
It is most likely your wsl2 environment based on the error you can try using the /mnt/c path to cmd.exe instead and see what you get? I have seen similar issues in the past where the $PATH
has backslashes in it or mixing windows style ;
delimiters with Linux style :
. Its probably something in that area though. Also check alias
to see if something is dangling there
user@XOTICPC:~$ alias alias alert='notify-send --urgency=low -i "$([ $? = 0 ] && echo terminal || echo error)" "$(history|tail -n1|sed -e '\''s/^\s[0-9]+\s//;s/[;&|]\s*alert$//'\'')"' alias egrep='egrep --color=auto' alias fgrep='fgrep --color=auto' alias grep='grep --color=auto' alias l='ls -CF' alias la='ls -A' alias ll='ls -alF' alias ls='ls --color=auto'
user@XOTICPC:/mnt$ ls -l ls: cannot access 't': Input/output error ls: cannot access 'n': Input/output error ls: cannot access 'c': Input/output error total 0 d????????? ? ? ? ? ? c d????????? ? ? ? ? ? n d????????? ? ? ? ? ? t drwxrwxrwt 5 root root 100 Oct 5 13:58 wsl
this is a new error... never had an inability to access /mnt/* before... i really don't want to have to re-install ubuntu from scratch, though...
Edit; running wsl --shutdown in powershell and restarting bash fixed that... not sure why...
Edit 2: tried making a symbolic link to C:\Windows\System32\cmd.exe in /bin/ but that made no difference in error codes... even though linux said it could find cmd.exe there.
i checked my windows system logs... i remember that i did update Python on the Windows machine from 3.8.4 to 3.8.6... i wonder if that could have caused this...
Try running the cmd.exe command from windows? Your windows python version shouldn't change your Linux python environment
yeah. cmd.exe brings up the command prompt.
Microsoft Windows [Version 10.0.19041.508] (c) 2020 Microsoft Corporation. All rights reserved. C:\WINDOWS\system32>ver
Microsoft Windows [Version 10.0.19041.508]
C:\WINDOWS\system32>
I mean
cmd.exe /C echo %USERPROFILE%
It should print your home directory. That should work in the exact same way from your wsl environment when all is well
C:\WINDOWS\system32>cmd.exe /C echo %USERPROFILE% C:\Users\Ringtailed Fox\
The odds are its something wrong with your PATH environment variable in wsl. Check the output from
echo $PATH
And look for the system32 path, and anything else that might fight with windows dlls
beware, it's kinda long... it imports the Linux path and the Windows Path... as well as the $NEWPATH variable I use for tools and included into the regular windows path:
user@XOTICPC:~$ echo $PATH /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/mnt/c/windows/system32:/mnt/c/windows:/mnt/c/windows/system32/wbem:/mnt/c/windows/system32/windowspowershell/v1.0/:/mnt/c/WINDOWS:/mnt/c/WINDOWS/system32:/mnt/c/WINDOWS/System32/Wbem:/mnt/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/mnt/c/WINDOWS/System32/OpenSSH/:/mnt/c/program files/intel/icls client/:/mnt/c/program files (x86)/intel/icls client/:/mnt/c/Program Files (x86)/Common Files/Intel/Shared Libraries/redist/intel64_win/compiler:/mnt/c/programdata/oracle/java/javapath:/mnt/c/program files (x86)/common files/oracle/java/javapath:/mnt/c/VulkanSDK/1.2.141.2/Bin:/mnt/c/program files (x86)/universal extractor:/mnt/c/program files (x86)/universal extractor/bin:/mnt/c/program files/vim/vim82:/mnt/c/program files/mozilla firefox/:/mnt/c/program files (x86)/intel/intel(r) management engine components/dal:/mnt/c/program files/intel/intel(r) management engine components/dal:/mnt/c/program files (x86)/intel/intel(r) management engine components/ipt:/mnt/c/program files/intel/intel(r) management engine components/ipt:/mnt/c/program files/dotnet/:/mnt/c/Program Files (x86)/dotnet/:/mnt/c/program files/microsoft sql server/130/tools/binn/:/mnt/c/program files (x86)/windows kits/10/windows performance toolkit/:/mnt/c/program files/microsoft sql server/client sdk/odbc/170/tools/binn/:/mnt/c/program files (x86)/incredibuild:/mnt/c/program files (x86)/nvidia corporation/cg/bin:/mnt/c/program files (x86)/nvidia corporation/cg/bin.x64:/mnt/c/program files (x86)/lua/5.1:/mnt/c/program files (x86)/lua/5.1/clibs:/mnt/c/Program Files (x86)/NVIDIA Corporation/PhysX/Common:/mnt/c/Program Files/NVIDIA Corporation/NVIDIA NvDLISR:/mnt/c/Program Files/Microsoft VS Code/bin:/mnt/c/Users/Ringtailed Fox/AppData/Local/Microsoft/WindowsApps:/mnt/c/Users/Ringtailed Fox/AppData/Local/GitHubDesktop/bin:/mnt/c/Users/Ringtailed Fox/AppData/Roaming/npm:/mnt/c/ProgramData/chocolatey/bin:/mnt/c/ProgramData/chocolatey/lib/gsudo/bin/:/mnt/c/SysInternals:/mnt/c/GnuWin/bin:/mnt/c/Program Files (x86)/KDE/bin:/mnt/c/Cygwin64/bin:/mnt/c/MSYS2-x64:/mnt/c/program files/winmerge:/mnt/c/Program Files/PuTTY:/mnt/c/Program Files (x86)/WinSCP:/mnt/c/Program Files/VideoLAN/VLC:/mnt/c/Program Files/IPFS Desktop:/mnt/c/Program Files/IPFS Desktop/resources/app.asar.unpacked/out/ipfs-on-path/scripts/bin-win:/mnt/c/IPFS:/mnt/c/SBBS:/mnt/c/Program Files/Ferro Software/FtpUse:/mnt/c/Program Files/GVFS:/mnt/c/Program Files/Git/cmd:/mnt/c/Program Files/IrfanView:/mnt/c/Program Files/Process Lasso:/mnt/c/Program Files/TortoiseHg:/mnt/c/Program Files/TortoiseSVN/bin:/mnt/c/Program Files/TortoiseGit/bin:/mnt/c/program files (x86)/gnupg/bin:/mnt/c/Python27-x64:/mnt/c/Python27-x64/Scripts:/mnt/c/program files/python36/:/mnt/c/program files/python36/scripts/:/mnt/c/Python38-x64:/mnt/c/Python38-x64/Scripts:/mnt/c/perl64/bin/:/mnt/c/RUBY-x64/bin:/mnt/c/otvdm:/mnt/c/tools/fsvwin_v0.9_b3/bin:/mnt/c/Program Files/Git/cmd:/mnt/c/Strawberry/c/bin:/mnt/c/Strawberry/perl/bin:/mnt/c/Strawberry/perl/site/bin:/mnt/c/tools/NirLauncher/Nirsoft:/mnt/c/Program Files (x86)/GTK2-Runtime/bin:/mnt/c/Program Files/OpenSSH-Win32:/mnt/c/Program Files/Docker/Docker/resources/bin:/mnt/c/ProgramData/DockerDesktop/version-bin:/mnt/c/Program Files/ImageMagick-7.0.10-Q16-HDRI:/mnt/c/Program Files (x86)/VMware/VMware Player/bin/:/mnt/c/Program Files/TortoiseHg/:/mnt/c/Program Files/PowerShell/7/:/mnt/c/Program Files (x86)/QuickTime/QTSystem/:/mnt/c/tools/BCURRAN3:/mnt/c/Program Files/Microsoft/Web Platform Installer/:/mnt/c/Program Files/Docker/Docker/resources/bin:/mnt/c/ProgramData/DockerDesktop/version-bin:/mnt/c/Program Files/nodejs/:/mnt/c/Users/Ringtailed Fox/scoop/shims:/mnt/c/WATCOM/BINNT:/mnt/c/WATCOM/BINW:/mnt/c/Ruby-x64/bin:/mnt/c/Program Files/Oracle/VirtualBox:/mnt/c/Program Files/smartmontools/bin:/mnt/c/gstreamer/1.0/x86_64/bin:/mnt/c/Program Files (x86)/gtk-3.8.1:/mnt/c/Program Files/gtk-3.8.1:/mnt/c/Users/Ringtailed Fox/Documents/PowerShell/Scripts:/mnt/c/Users/Ringtailed Fox/.dotnet/tools:/mnt/c/gstreamer/1.0/msvc_x86_64/bin:/mnt/c/Program Files (x86)/p-nand-q.com/GTools:/snap/bin:/home/user/.local/bin
i'm not sure what else to check on WSL.... i can try making a second ubuntu install and see if that works... but this is getting depressing
I tried making a new WSL2 instance of ubuntu... and it returns the same errors:
user@XOTICPC:~$ wsl-windows-toolbar
Traceback (most recent call last):
File "/home/user/.local/bin/wsl-windows-toolbar", line 5, in
yeah, it doesn't even work in a new ubuntu install, either.. i wonder if I have to completely nuke WSL and re-install it.... I'll try system restore to last week before that, however.
okay. after about 8 hours of searching I FINALLY fixed it. the problem was as described by this user: https://github.com/microsoft/WSL/issues/4567#issuecomment-680034755
sudo update-binfmts --disable cli
is what fixed it.
Just in case the link breaks, I've included a quotation describing the issue and the fix below:
kodsnutten commented on Aug 25, 2020, 9:45 AM:
I also ran into this problem (e.g. error message "run-detectors: unable to find an interpreter for /mnt/c/Windows/explorer.exe").
It turned out that my problem was that I installed nuget package manager in the wsl2-container, and nuget required mono-runtime, which registered another entry (named cli) with /proc/sys/fs/binfmt_misc .
I was able to confirm this by disabling the cli interpreter using the command:
sudo update-binfmts --disable cli
After that nuget did not work from within the wsl2 container, but I was able to start explorer.exe
Edit: I also had to uninstall mono-runtime due to other errors elsewhere from other scripts, like wslfetch complaining about reg.exe...
it's working properly now... i was able to diagnose things... just... make sure to NOT install nuget or mono-runtime, since they will foul everything up! it's safe to mark this problem as closed now... but I can re-open it if something else causes it...
whenever i try running wsl-windows-toolbar as a user from within WSL2 bash prompt, it just sits there for a few seconds, then spits out this odd error:
user@XOTICPC:~$ wsl-windows-toolbar Traceback (most recent call last): File "/home/user/.local/bin/wsl-windows-toolbar", line 5, in
from wsl_windows_toolbar.wsl_windows_toolbar import cli
File "/home/user/.local/lib/python3.8/site-packages/wsl_windows_toolbar/wsl_windows_toolbar.py", line 26, in
WINDOWS_USERPROFILE = subprocess.check_output(
File "/usr/lib/python3.8/subprocess.py", line 411, in check_output
return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
File "/usr/lib/python3.8/subprocess.py", line 512, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['cmd.exe', '/C', 'echo', '%USERPROFILE%']' returned non-zero exit status 1.
I have no idea what would cause that. It used to happen on occasion, but rebooting my machine would usually fix it... what can I do to fix this odd behavior?
is it because my windows user profile has a space in it? (C:\Users\User Name\ instead of C:\Users\UserName\, for example)...