I use powershell as shell in Windows. When I\'m trying to launch some application who\'s dll dependencies are missing in PATH environment variable, then nothing happens, powersh
I was having this same problem. PowerShell was setting $LASTEXITCODE
code to -1073741515
(0xC0000142
, 3221225794
) but no output explaining what was actually wrong. When running it via cmd.exe I would get popup with something like:
The code execution cannot proceed because some.dll was not found. Reinstalling the program may fix this problem.
cygwin bash outputs errors relating to dll not found to stderr and if you run the the same via bash from PowerShell then you can see the error:
> & 'C:\tools\cygwin\bin\bash.exe' '-c' '"C:/Users/xxx/dir/main.exe"'
C:/Users/xxx/dir/main.exe: error while loading shared libraries: another.dll: cannot open shared object file: No such file or directory
This works with git bash also:
> & 'C:\Program Files\Git\bin\bash.exe' '-c' '"C:/Users/xxx/dir/main.exe"'
C:/Users/xxx/dir/main.exe: error while loading shared libraries: another.dll: cannot open shared object file: No such file or directory
Quite a hack but better than nothing.