microsoft / WindowsAppSDK

The Windows App SDK empowers all Windows desktop apps with modern Windows UI, APIs, and platform features, including back-compat support, shipped via NuGet.
https://docs.microsoft.com/windows/apps/windows-app-sdk/
MIT License
3.81k stars 321 forks source link

Common Startup Task Support #10

Closed jonwis closed 3 years ago

jonwis commented 4 years ago

Proposal: Common Startup Task Support

Summary

Packaged applications have a specific StartupTask type that lets them manage tasks that run when the user logs on. Provide a type that gives the same startup task functionality across all kinds of applications, ideally modelled after the StartupTask type.

Rationale

There are many different documented ways to create and configure startup tasks for Win32 unpackaged applications. Packaged apps (UWP, Desktop Bridge) use the common StartupTask type. This disparity makes it hard to transition from Win32 to UWP or back. Windows should have a single strongly-documented API surface that lets apps create tasks that launch them at startup.

Scope

Capability Priority
Single API for UWP and Win32 apps to manage user-logon startup tasks Must
API calls the UWP implementation when necessary to enable user control Must
API uses platform-supported mechanisms to reduce "logon churn" Should
API lets Win32 apps declare startup tasks at runtime instead of in manifest Should
API lets users approve startup task requests even for unpackaged Win32 apps Could
API lets apps detect when their startup task has been disabled by the user Could
API lets apps force their startup task to be enabled without user prompt Won't
API requires unpackaged apps get packaged Won't

Important Notes

Use of this API will not require a Win32 app get packaged, but the app might need to carry an artifact declaring the startup tasks in a way similar to how packaged applications declare them.

Open Questions

Should a Win32 app running elevated be allowed to enable their startup task for all users, or only the current user?

Should the API enable the complicated "run elevated at startup" task described in MSDN?

stevewri commented 4 years ago

See also #46 for related issue

mdtauk commented 4 years ago

Would this also need to include affordance for System Tray apps/icons - which are not available in 10X, and not currently available for UWP apps.

The System Tray/Notification Area has some of the least consistent UI of all Windows applications. With other taskbar flyout UIs now using Xaml and presenting a consistent UI/UX - could Microsoft try to come up with a secure and flexible UI presentation surface/context Menus/icon handlers which have graceful fallback for 10X and those devices like Hololens and Xbox?

stevewri commented 3 years ago

@andreww-msft - does https://github.com/microsoft/ProjectReunion/issues/111 cover all the bases for this issue?

andreww-msft commented 3 years ago

Yes, covered in #111 .