Window has a self preservation thing going on. You can not format the drive if the operating system is running. You have to use an outside program to format the drive. The OS disc, hard drive maker's software, or a Linux distro disc. Windows will not self terminate. Like the Terminator, it has to have some thing else wipe it out.
If the optical drive is not working only other way is to make a bootable USB stick. But then you're going to have to have a working optical drive to get windows back on it. You can put a Linux distro on it from a USB thumb drive.