It is recommended to wait 2 hours. If after 2 hours your computer is still stuck at the "Preparing to install Windows" screen, try the following solution.