node-auto-launch
node-auto-launch copied to clipboard
Modify startup status on Windows
Currently auto-launch will add/delete a registry key to add it to the startup list. WIndows also seems to remember what the status that was set between adding/removing from the startup list which probably means that it is a separate registry key entry somewhere else.
Can we change the startup status to Enabled/Disabled if the key already exists?

API-wise, the default for the enable/disable methods would probably be setting the status if it already exists, and then pass a "hard" option in to delete it from the startup list.
// Set the status to `Enabled` if it already exists
// Otherwise create the entry
autoLaunch.enable();
// Set the status to `Disabled`
autoLaunch.disable();
// Remove from startup list
autoLaunch.disable(true);
I would love to be able to implement this but haven't been able to find any mention of how to accomplish it with registry keys. If anyone has an ideas on how to go about this it would be great to get your input.
Thanks for the suggestion!
One way would be with HKLM/SYSTEM/CurrentControlSet/Services or making a new service with services.msc . But both would bring the UAC up
Using process monitor while disabling / enabling items inside the task manager led me to the following registry:
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\StartupApproved\Run\{application_name}
It seems to hold binary data of 02 00 00 00 00 00 00 00 00 00 00 00 when enabled, and... something else when disabled. Looks like when disabled, the binary always starts with 03 00 00 00 ... followed by varying hex, changing based on which application is being disabled, I think. I'm not sure why, or what the disabled binary is supposed to represent.
Found some additional information here: http://superuser.com/a/664672
worth to mention that - at least for me - this is not an issue with win7 but with win10