Interesting SW question

All hardware and software related discussion topics here. Advice, discussion and opinions on either topic are welcome.
User avatar
jezevex
Posts: 1968
Likes:
Joined: Sun Jun 05, 2011 1:00 am

Interesting SW question

Post by jezevex »   0 likes

Hello,
upgraded my PC and during this process (when I was formatting one of my old hard-drives) crossed my mind one thing:

Everyone knows that you can't format a disk with a system (e.g. W10) via explorer when this system is running. But what about cmd.exe? If I run it with administrator privileges, type format c:, it normally goes to the question: "Formatting will delete all files of your drive. Are you sure to continue?" It's kinda strange. Normally I would except some error message BEFORE this question.

Does anybody know what appears when you answer Y?

And what about cleaning a disk with Diskpart? Is it the same situation, in the case of system drive?

I'm asking this question here (and not on some general PC forum) because I hope that you know me and you won't make fun of me (or at least only a little that I permit to you) or suspect me that I'm coming here with bad intentions to cause a damage on somebody's PC... :-)

TFYA,

Jez.
User avatar
Warg
Posts: 772
Likes:
Joined: Tue Jul 12, 2016 11:24 am

Re: Interesting SW question

Post by Warg »   0 likes

jezevex wrote:Does anybody know what appears when you answer Y?
Well, either you are redirected to the MS suicide hotline or you get a blue screen that says "Walk into the light ..." :shock: :lol:

But much more probable is you get an error message telling you formatting the systrem drive is not possible, since in the other case Windows would sooner or later go into nirvana. It's hard to imagine a scenario that does not end disastrous ... :think
User avatar
ghost
Site Admin
Posts: 8460
Likes:
Joined: Sun Mar 07, 2004 1:00 am

Re: Interesting SW question

Post by ghost »   0 likes

Formatting drice C: while Windows is running is simply not possible. Also with the cmd.exe you will get an error message. That's for sure.
User avatar
Phuzzy4242
Site Admin
Posts: 7686
Likes:
Joined: Sun Aug 23, 2009 1:00 am

Re: Interesting SW question

Post by Phuzzy4242 »   0 likes

Diskpart is the modern-day equivalent of the old fdisk and you can make changes to disk partitions, including RAID, while Windows is running, but not to the system disk itself. I've never tried formatting C: while running it, nor tried to clean the system drive with diskpart while it's running, so I can't tell you for sure. I may try to do that the next time I need to reimage a system at work.

Diskpart is pretty easy to use, and it's great for prepping a flash drive to be bootable.

* Insert a USB flash drive
* Open a Command Prompt as administrator.
* Type diskpart (C:\Windows\System32\diskpart.exe)
* Type list disk (lists drive numbers)
* Type select disk X (X is the drive number or letter)
* Type clean (erase everything - may need to do twice)
* Type create part pri (create new primary partition)
* Type select part 1 (select the new partition)
* Type active (make flash drive active)
* Type format fs=ntfs quick (format the partition)
Type format fs=fat32 quick (ONLY IF UEFI!)
* Type assign (assign a drive letter)
* Type exit (exit diskpart)

Go ahead and try to format your system drive while it's running and tell us what happens. :lol:
Post Reply