As it turned out, everything is not so complicated.
Of course, if I wanted to add an option to remove cortana in the toolbox so that there would be no bug, I think I would have to go through a lot of trouble.
So, the most important thing is to perform these steps before installation of windows...