Detecting System Startup Event
I would like to execute 开发者_如何学Pythona procedure that should be fired only upon windows system startup, and startup here does not mean program startup. Is there anything that I can do to trigger my procedure. If possible, i would like to avoid messing with the registry. I am using delphi 2010.
There are many options, but all will involve settings that require admin rights. These options include:
- Put your routine in a service that is set to start automatically. This will start up when the system starts up and before any user has logged on.
- Add an entry to
HKLM\Software\Microsoft\Windows\CurrentVersion\Run
. This will execute when an interactive user logs on. - Add a scheduled task with an appropriate trigger, e.g.
At startup
.
精彩评论