.NET MAUI MSIX add files

Ángel Rubén Valdeolmos Carmona 611 Reputation points
2023-07-27T05:03:41.8533333+00:00

My .NET MAUI desktop application for windows needs an .exe file and a dll (in c++) for a particular functionality. This DLL and .exe are required to be in system32. Is it possible to create an installation package (MSIX) so that the .exe and the dll are copied to system32? Or run some powershell or bat script to do the same.

Developer technologies | .NET | .NET MAUI
Windows for business | Windows Server | User experience | PowerShell
Developer technologies | C#
Developer technologies | C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 45,126 Reputation points
    2023-07-27T14:08:33.9866667+00:00

    Hello

    Thank you for your question and reaching out.

    Windows provides access to the application package's location.Path property for ApplicationModel.Package.Current.InstalledLocation.

    https://techcommunity.microsoft.com/t5/modern-work-app-consult-blog/msix-how-to-copy-data-outside-the-installation-folder-during-the/ba-p/1133602

    --If the reply is helpful, please Upvote and Accept as answer--


Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.