0

I created a UWP app with desktop extensions and added the startup task as mentioned here. (I set Executable="AutoStartupTest.exe".)

I logged off and logged on and got the error in the title, and don't know how to fix it because though it makes sense - why is it not in a container? This should happen automatically, no? The link is talking about a UWP app.

EDIT

The extension snippet as requested here.

<Extensions>
  <desktop:Extension Category="windows.startupTask" Executable="AutoStartupTest.exe" EntryPoint="Windows.FullTrustApplication">
    <desktop:StartupTask TaskId="someId" Enabled="true" DisplayName="Hi user!" />
  </desktop:Extension>
</Extensions>
ispiro
  • 26,556
  • 38
  • 136
  • 291
  • I know the error is not very helpful. Is this a .NET executable? Try putting it in a subfolder and then reference it accordingly in the manifest, e.g. Executable="Win32\AutoStartupTest.exe". Let me know if this doesn't solve it. – Stefan Wick MSFT Aug 24 '17 at 17:36
  • @StefanWickMSFT I was testing it on a regular UWP app. It seems that's impossible. I tried now with a Centennial app and it's working because it calls a .net exe which does not have to be executed in an app container. Thanks anyway. – ispiro Aug 24 '17 at 21:34
  • It also works when the main app is UWP, and the startup task is a regular desktop EXE. Let me know if you can't get it to work and I will share a working sample project. – Stefan Wick MSFT Aug 24 '17 at 22:36

1 Answers1

2

StartupTask support for UWP processes is coming in the Fall Creators update later this year.

What you can do today is add a non-UWP EXE to your UWP package and reference that as StartupTask. Be sure to put it in a subfolder inside your package and reference it accordingly, e.g. Executable="Win32\AutoStartTest.exe". Also in this approach you will need to declare the 'runFullTrust' capability.

Stefan Wick MSFT
  • 13,600
  • 1
  • 32
  • 51