I'm writing permanent file deletion tool and accessing raw disk clusters. Since Windows Vista writing into raw disk is a bit more complicated.

I have tried on my external data device first and worked fine, however one of the steps was dismounting of the volume, not sure if it is a good idea to dismount main volume where the Windows are.

Want to ask that is possible consequences and if it safe/unsafe/very unsafe.

EDIT: for dismounting I used this API.

Also here I have found this written:

A dismounted volume has the following properties:

There are no open files.
The operating system does detect the volume.

If OS detect the volume, so only OS should be able to access files.

  • Nobody does this ever - even Microsoft, for good reason. The right way is to do this at boot-time. However, you might want to stand on the shoulders of giants and see how sysinternals did it with sdelete. They use the defragmentation API to do this, which means they don't need to dismount. – Journeyman Geek Oct 31 '13 at 9:55

I doubt Windows will actually -let- you dismount the volume, but if you manage to get around that you can expect to see your system rapidly become incredibly unstable - Since you've dismounted the location of the Registry, driver files, dll files, and everything else that the entirety of your system relies on to function.

| improve this answer | |
  • And probably the page file - instant blue screen. – MSalters Oct 31 '13 at 10:24
  • 1
    @tjennings - I agree. One of two things will happen. You will get an error when you attempt to dismount the system disk or it will happen and you will get an instant BSOD caused by the kernel. – Ramhound Oct 31 '13 at 10:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.