Formating usb
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
4 posts
Page 1 of 1
I am trying to add the ability to format a usb on button click i have it so when it loads it detects the usb and lists them for you to pick through now i need it to take the drive letter that you pick in the combobox and format it in fat 32 then set it as active then copy files to the drive any help on this would be great
thanks in advance
thanks in advance
There is a simple way of formatting Removable drives but that's for FAT 16.
You might want to look into SHFormat. However it is fairly old and poorly documented. I can't help any more than that but good luck.
You might want to look into SHFormat. However it is fairly old and poorly documented. I can't help any more than that but good luck.
My name is Tom | Visit my blog where I post new content every day! Tom's Daily Blog | MineCraft is awesome!
this is used to get available drivers in combo
Code: Select all
you can format with WMI http://technet.microsoft.com/en-us/libr ... 56569.aspx
Imports Microsoft.Win32
Imports System.IO
Public Class form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
For Each drive In Environment.GetLogicalDrives
Dim InfoDrive As DriveInfo = New DriveInfo(drive)
If InfoDrive.DriveType = DriveType.Removable Or InfoDrive.DriveType = DriveType.Fixed Then
ComboBox1.Items.Add(drive)
End If
Next
End Sub
End Class
Find my programs on Softpedia
It is possible to open the shell format window with the SHFormatDrive function.
This thread might be useful: viewtopic.php?f=32&t=6704&p=49677#p49754
This thread might be useful: viewtopic.php?f=32&t=6704&p=49677#p49754
4 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023