There is a BIG, very BIG indeed, problem with some "programs".
Each time they run, they set / touch the registry to add an entry on \Software\Microsoft\Windows\CurrentVersion\Run so next boot they will run again as soon as login, and they do not have any option to disable such thing.
I hate such way of doing things, but sometimes such program must run (drivers related).
Just as an example: a document/paper flat scanner that without a program running (has no GUI) on background does not work at all, that program get installed when drivers are installed (it is not twain compatible, sorry!, just in case some expert think on that other way of getting arround the problem)... now the bad part, such program put it self into registry, so it allways runs as soon as login, now the worst part, if i delete the registry entry while such program is running, it re adds the entry.
I have a very ugly workarround (mix of automated and manual tasks) to avoid having it running all the time (most days i do not use such scanner, also more, a lot of days i have it not connected to USB port)... it is based on running a script that does two things or three... launch the .lnk for starting that program, launch a wait/sleep for two minutes (the time that program freeze the Windows while it is being starting) so the script waits for such program to be enterly loaded, then launch the .lnk of the scanner front-end gui so i can scan papers. After i finish i manually use ProcessExplorer to kill auch program, then run a .reg i created to delete the entry from the registry, so it will not run on next boot.
Since when i delete the registry entry such program is not running (i killed it before) it can not add to the registry, the entry to lauch it self on next boot... if i forgot to kill it, as soon as i delete the entry (press F5 to refresh registry entries) it has been re-created.
If i do it that way i gain each day more than two minutes on each boot.
So how can any tool get arround that ugly (to not say any worst word) way of doing things: The program add it self to start up, not only each time it is run, as soon as the entry is deleted.
I had use a tool (very similar to the RegMon from SysInternals, but with a different GUI so it tells you the time took from one event to next event on same registry "folder" that is been monitorized), from when i delete the entry till such ugly program re-create it, only pass beteween 0.00001 and 0.0002 seconds (yes less than two miliseconds), so such program must use a hook to the registry to monitor changes (indeed it has, a debugger i used also show it has).
So how can anyone run a program that monitors registry to add it self to startup list if it is not there.
I tried one more thing (not so stupid as you may think, it is just a test), i rename (not delete) the entry and see what happens... the entry is renamed back to what such program wants.
If such program only monitorize the "deletion" of the named "X", there is a "trick", based on rename it prior to delete the renamed one; in this case it does not work... the program also monitorize anything done to the entry and revert back it to what it wants... so while program is working, there is no other option ... it will be re-run on next boot, unless after killing it the registry key is deleted.
Also worst... a driver update make things worst, much worst... now i can not kill such task after it is started... it does something very weird, so unless i kill a task called "system" (yes the main windows task) i can not kill it, but killing such task obviously would make a very beautifull BSOD.
Solution (that did not work at all): Unplug the USB scanner, uninstall driver, scanner application and all things related to it, remove device from USB list telling to remove all files used for it, etc. Use CCLeaner to clean invalid registry entries... since main program is running on background, i can not kill that task, i can avoid registry from having the launch entry, etc... rebooting into safe mode (the program also adds it self to registry for secure boot) is not a solution, program is again runned.
Also i had tried one cannon solution... use a tool to set such file to be deleted on next boot, but next boot told: The file can not e deleted, it is in use.
The last update of the driver put a lot barriers to disallow not having it running... so i would got to the "master" solution (if i not be catholic), go to the manufacter with the scanner and break it on the head of the responsible of such way of running the "driver"... since i am catolic... i do the other "master" solution... no, not format it... take a Linux Live and from Linux edit the partition of the Windows System and "delete" the program, that way it can not be running on next boot... if i do not forget to remove the +20 places where it is on the HDD... and remember, it is not a trojan, not a malware... it is a driver for a quite old scanner from a very welll known manufacture (two letters in abrev.)... and then boot into windows, clean registry, etc... and never ever again plug that scanner on any computer... since plugging it, it auto-install that driver without any option to avoid it... since Windows had downloaded last version of such driver (if no internet connection) it also install the last one (tested) and again the same problem... and same solution... delete all files using a Linux.
I know there is a tool to edit registry security, but it does not allow to chage locked entries, and changing the full \Software\Microsoft\Windows\CurrentVersion\Run security is too much harm, not to mention it is of no sence... such program that edits the registry is running in system account... more privilegies than administrator one... too much more, that it can jump all security.
Trully, it is the top most worst program i found to get rid of it... much more than virus, trojan, malware, etc... and it is a "driver" for a scanner.
Why i do not let it run on each boot: when it starts it takes a little more than two minutes where PC seem to be freezed, no matter if run at boot, or run manually after boot... in such two minutes you can not do anything, no screen refresh, no mouse pointer moving, etc.
Now i have a TWAIN compatible USB scanner, that other one i only use it to smash rocks on the yard! I won't let anyone to suffer what i suffer... and of course i will not buy anything from that manufacture again, no matter what ever say.
Well, said that, very, very extreme case... i must admit, i use a lot of programs that tend to run on start-up... a lot of them have an option to not auto-run on logon, but others do not have such option... any of them lock the registry, nor re-add to the registry... but there are a couple of them, that after lauched the re-add them selves to the start-up registry entry.
For such ones, i have my own launch script: launch the .lnk of the program, do a sleep of some minutes (enough to let them re-add to registry), launch the .reg to delete such entry... and voila, at next boot they are not run again.
But one of them, re add it self on exit, so i must use a very different aproach, my script is: launch the program with a /wait (use start to launch it), but ensure you launch the program not the .lnk... then the script is waiting / sleep till the program ends, then the script continue, and delete the registry entrie.
Another one is quite a bit more tricky... needs a shutdown task on taskmanager... since when it starts it launches another process in no wait way... so my script (with /wait) would only wait till main program ends (a few miliseconds) but not for the main one that is launched... so my shutdown script does: try to kill the program, then delete the registry.
In other words... if registry is not locked... my top very best fail proof solution is to use my own script (with a black list like) that runs on shutdown, it kills the programs involved and then delete teh registry keys i do not want on next boot to be run.
That way i can launch the programs only when i want and not on all the boots.
Side effect: some of them need to be run with elevated / admin rights... and since i do not want to disable ACM, i must press an OK for each one... if i let them on boot they run without need for such confirmation.
It would be glad from M$ to have implemented in another way... if something need elevated rights, ask for it and let the user tell (do not ask me more times in the future), as well as when editting a .lnk to tell need elevated rights / runas admin... have another option (do not ask) and to activate such option ask the user as when elevated asks... so can not be trapped and only be activated by the real user... etc.
Till then, if i must run an app that put it self onto registry, i will use a RegMon monitoring all such +8 places where an app can put an entry to auto-run on next boot... i do not know of any freeware that can do something similar for folders, neither for scheduler... except one very intrusive, that asks you for confirmation on ANY change... something that makes some apps to fail (time-out messages).
I leave all this info, for the rest to know and just in case any developer see it and would be able to create a great FreeWare tool for: lock the real registry auto run entries, directories, schedule tasks, but let apps think they had modified it, like a sand-box tool; then present to the user which one wants which change and let mark/check if allowed or not, so next boot would be as desired by user, not by each app.