Formatting Removable Drives using vb code
hi guys.
I am developing application to make bootable USB drive, for that i wants to format usb drive.but I couldn't find any way for the same.
I got solution that suggests use of SHformatdrive(), but how can i include that function.I am using VB 2010 (VS2010). Is there any different way?
Re: Formatting Removable Drives using vb code
The absolutely easiest way would be to call to cmd.exe (this makes your application OS dependent though, so you might want to think about it).
Simply do something like
Shell("cmd.exe").WaitUntilExit()
And you also pass the arguments which cmd.exe needs to format a drive.
Re: Formatting Removable Drives using vb code
Oh yeah -- Sorry for the double post --
But you have to format your drive as FAT32 to make it bootable.
If you format it to NTFS, BIOS won't be able to read it.
Re: Formatting Removable Drives using vb code
Hello,
I'll write you a little program tomorrow that should be able to help.
Re: Formatting Removable Drives using vb code
@Zeelia,thanks,but is there any other way than using command prompt.