Someone very helpful over on superuser wrote this script for me, the purpose of it is to wipe specific sectors on a running windows HDD with zeros. Here’s the code:
I am not sure how to compile that and run it? Would i need to use like visual studio express and compile it then run it from cmd line? Also i am not sure if it will work as windows 7 basically stops any program (like hex editors) from messing with the HDD while it is the one in use.
You can just run it like:
wipe \.\PhysicalDrive0 0 512
where the first argument is the file name, the second is the offset, and the third is the >number of bytes. The number of bytes probably can’t be over ~63 MiB.
Of course i wouldn’t input 0 and 512 as that looks to delete the MBR.
Thanks for any help.
Two things.
1) Never compile code that you can’t read, that code could easily wipe your entire hard drive with zeros (on purpose, or by accident).
2) Look at Eraser, does the same thing, but has been tested well.
Though to answer you question, yes visual studio C++ express should compile that.
Alright, lets break this down. You can compile the program use visual studio. Visual studio is an IDE (development environment) that allows you to write code easily. There are other compilers if you would like to use them instead. The entire idea is to make this code an executable.
To do this you need to do the following:
Fell free to ask if part of this doesn’t make sense, give me the step you are on, and why it doesn’t make sense.