I’m trying to disable the built-in administrator account in Windows 10 as soon as possible when Windows starts using ‘net user administrator /active:No’ command. I know I can disable the account using a batch file and wish to minimize the time that the account may be enabled following a reboot. This is assuming that the administrator account was enabled before the reboot, therefore is expected to boot up with the account still enabled.
What method is best to run a batch file as early as possible during Windows boot. I know there are various ways including scheduled tasks, Windows service, registry ‘Run’ key, GPO etc. Are there any others that I’m missing? Is there a clear priority of which of these methods will run first to disable the account quickly assuming it was enabled on the previous boot?