launch_at_startup icon indicating copy to clipboard operation
launch_at_startup copied to clipboard

fix(windows): detect startup approved register

Open kamilkarp opened this issue 1 year ago • 0 comments

Currently, this plugin won't detect if the autostart is truly enabled. To do that correctly the startup approved register should also be checked. The odd first byte of this register will prevent the app from autostarting. Even byte or none will allow it. This register is used by the Windows Settings or any other app that can modify startup behaviour. Normally, when Windows Settings enables app to autostart, it will set the first byte to 0x0 or 0x2 and zero-out other 11 bytes.

To reproduce:

  • open example app
  • enable autostart in the app
  • open Windows Settings -> Apps -> Startup
  • disable autostart for the example app in Windows Settings
  • reload the example app

The app will show that the autostart is enabled, but in fact, it is not.

With startup approved registry check it will show the true autostart state.

kamilkarp avatar Mar 07 '24 19:03 kamilkarp