batch-fileoperating-systemformatbootdrive

How to run batch script during windows boot?


I have a batch command (script) that format operating system drive, but as you know I can't format this drive in after a windows started, so I want to execute this script during windows boot (Black Screen), how can be done ?

Thanks


Solution

  • I'm not 100% sure but for security reasons, you cannot.

    The best way is to create a bootable device (USB or CD-ROM) and include the script on it.

    Better add a confirmation in red (or two) before running the format, though.

    Alternate way: boot the windows 7 installation CD, and type "ctrl+F10" (or is it shift+F10?). You get an admin cmd prompt, and have then access to all low level stuff: fdsisk, format...

    Of course you may have to get access to BIOS settings to be able to do that (change boot priority).