|Userinit is the wrong place to put it. If something goes wrong with the executable, your user is denied the ability to log on. Even administrators, attempting to work during a network outage, might not be able to log in.|
The correct way would be to use AD as intended and have a logon script that runs whenever anyone logs in.
The, "I must add this functionality programmatically!" method would involve creating a service, and have that service subscribe to Service Control Manager notifications.
How To Ask Questions The Smart Way