6

Solved. (See my answer.)

I have a couple of startup apps using the desktop bridge. In the past they used to work fine. Now, probably after some Windows update, after a reboot they don't start when I first log on, and don't even appear in the startup tab in Task Manager. After I log off and on again, they immediately start, and also appear in the task manager.

More Info

They all use desktop:Extension Category="windows.startupTask". And in sign-in options I have "use my sign-in info to automatically..." turned off.

EDIT

The issue resolved itself after the last Windows update July 2019.

EDIT 2

Spoke too soon. The problem is back. And it doesn't (always?) resolve itself after logging off and on. And it seems like after a couple of minutes (much more than the 10 seconds of startup delay) they do (sometimes?) appear in the startup list (but perhaps only after I start them manually?).

ispiro
  • 26,556
  • 38
  • 136
  • 291

2 Answers2

1

Isolating the cause was difficult because the problem seemed to manifest itself in a random manner. Sometimes solving itself, sometimes not...

The reason was that it was caused by a semi-external reason. I had an application that was registered as a startup app but wasn't "installed". It was still in development and was running from Visual Studio. And its drive was not available immediately when logging on. As soon as that drive would become available, that and the other startup apps would be added to the startup list.

ispiro
  • 26,556
  • 38
  • 136
  • 291
0

Have you verified the documentation on StartupTask class from MSDN? There are a couple of examples there, and a description on how to properly doing it. Perhaps something is missing on your app manifest? Check this out: MSDN Windows ApplicationModel StartupTask

EDIT

From the page's "Remarks" section, perhaps this note will be helpful:

"An app must add the windows.startup extension category to its app package manifest in order to be activated at startup or when the user logs in. Adding this extension will not, by itself, automatically cause the app start.

UWP apps must call RequestEnableAsync from a UI thread to trigger a user-consent dialog. If the user consents, the UWP app will then start on startup or user log in. Note that UWP startup apps will start minimized."

SammuelMiranda
  • 420
  • 4
  • 29
  • From your link: `If RequestEnableAsync is called from a packaged desktop app, no user-consent dialog is shown. Desktop apps can set their startup tasks to Enabled in the manifest, in which case they do not need to call RequestEnableAsync.`. Additionally, as I now realize I need to add in the question, this used to work fine until some Windows update. – ispiro Jul 17 '19 at 12:39