Results 1 to 5 of 5

Thread: Formatting Removable Drives using vb code

  1. #1

    Thread Starter
    New Member
    Join Date
    Dec 2011
    Location
    Pune, India
    Posts
    2

    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?

  2. #2
    Fanatic Member
    Join Date
    Mar 2008
    Posts
    519

    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.

  3. #3
    Fanatic Member
    Join Date
    Mar 2008
    Posts
    519

    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.

  4. #4
    Frenzied Member
    Join Date
    Jul 2004
    Posts
    1,202

    Re: Formatting Removable Drives using vb code

    Hello,

    I'll write you a little program tomorrow that should be able to help.
    come back and mark your original post as resoved if your problem is fixed

    Jamie Garland

  5. #5

    Thread Starter
    New Member
    Join Date
    Dec 2011
    Location
    Pune, India
    Posts
    2

    Re: Formatting Removable Drives using vb code

    @Zeelia,thanks,but is there any other way than using command prompt.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width