Share via

Launching fulltrust process from a background task fails when running on Windows Enterprise

Jos Huybrighs 136 Reputation points
2024-02-09T19:46:56.84+00:00

I have a WinUI/WindowsAppSDK desktop app in the Microsoft Store that registers a timer triggered background task. When the background task runs it launches the main app as follows:

if (ApiInformation.IsApiContractPresent("Windows.ApplicationModel.FullTrustAppContract", 1, 0))
{
  await FullTrustProcessLauncher.LaunchFullTrustProcessForCurrentAppAsync(parmId);
  message = $"Launched ({parmId})";
}
  else
{
  message = $"Can't launch ({parmId}): NotFullTrust";
}

This all runs well on Windows 10/11 Home and Pro but not on Windows Enterprise. On a Windows Enterprise the main app is not launched although LaunchFullTrustProcessForCurrentAppAsync doesn't return an error or causes an exception. The background task is a Out-Of-Process background task (authored in a C#/WinRT component). Could it be that there are special policies in Windows Enterprise that forbit a background task to launch the process? If so, which and can this be configured?

Windows for business | Windows Client for IT Pros | User experience | Other
0 comments No comments

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.