I needed to do it for a windows application I’m writing. My problem was to get the current serial number windows provides when a drive is formatted. You know, the one that appears when you type the “dir” command in a ms-dos prompt window. I googled around but I found only code for VB6 or code which should not have worked in a console application.
No default .NET object was giving me the piece of information I needed, so I though to get It directly from the “dir” command.
I got how to launch a process and get its output from EggHeadCafè but I added some work by me.
Read the rest of this entry »