I was aware of that technique if you are able to use a keyboard/mouse at the login screen, and putting it here is very useful.
However it will not work when you have no keyboard or mouse to use at the login screen. You cannot access the cmd prompt you substitute for the on-screen keyboard. Keyboard and mouse are available to talk to the installation software, but not the damaged system.
My original precautionary suggestion does no harm, relies on not much expertise/research/notes. Simply create a memorable local account with admin privilege.