kerenor
Posts: 11
Joined: Mon Mar 20, 2023 3:32 pm

Is there a way to allow loading dlls from PATH in MSIX?

Mon Jan 29, 2024 4:33 pm

Hello,
I didn't find how to make programs inside MSIX load dlls from the environment variable PATH, or from any external-to-the-msix location that isn't C:\Windows\system32.

In detail, I have an program that I intend to include in an MSIX package.
The program uses gstreamer, files of which are installed in C:\gstreamer\1.0\msvc_x86_64\, and the dlls are found in C:\gstreamer\1.0\msvc_x86_64\bin.
When adding C:\gstreamer\1.0\msvc_x86_64\bin to the environment variable PATH, the executable runs without errors. However, if I include the executable in the MSIX, it fails to load these gstreamer dlls.

I found that packaged apps don't even look at the PATH environment variable when loading dlls (https://learn.microsoft.com/en-us/windo ... kaged-apps), which begs the question... how can I tell the MSIX to load dlls from there?

It looks like something that would be handled in PSF somehow, but I couldn't find how. Adding a new DLL Path in AppCompat seems to only add folders from the VFS? And in my scenario, gstreamer is installed on the actual file system.

I prefer not to include it in the msix - it is guaranteed that every device in my organization has gstreamer installed.

What is the best way to load dlls from the non-default system path in MSIX?

Thanks!

Catalin
Posts: 6506
Joined: Wed Jun 13, 2018 7:49 am

Re: Is there a way to allow loading dlls from PATH in MSIX?

Mon Feb 05, 2024 4:29 pm

Hello,

It looks like this might be a limitation of MSIX.

I've found the following StackOverflow thread where users are facing a similar problem and it looks like to solution was ever posted:

Can't load external DLLs from MSIX packed application


Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”