I'm curious how CCleaner (more apps probably do it too) does it. The specific feature and behavior I'm looking to replicate is that you can disable startup programs without deleting them. The entry remains in the registry, but the app that was disabled does not start. So the disable was successful but the entry is still there. Where and how are these changes made to make this work?
答案1
Most all the programs just remove the registry entry from the registry, I use AutoRuns to see specifically where they run from in the registry, there are many locations programs can run from in the registry.
As a test I used Auto runs to see where a startup software I added runs from (HddLed), I opened registry editor and sure enough it was there, I then unticked the box next to the startup item in Autoruns and then refreshed the registry view, the entry was now gone. I went back to Autoruns and Ticked it again, and the entry returned.
I suppose other software can use other methods to accomplish the same thing, but this is the most common method.
. Before
.
After
This is where the particular software I added runs from in the registry.
HKCU\Software\Microsoft\Windows\CurrentVersion\Run