I want to format a usb drive. I know its not a good idea to format in code and all that. But i need to minimize the risk of a virus. 
When a usb is inserted it picks it up and formats. I have tried with this code, but it keeps telling me drive not found. And i know the drive exists.
	
	
	
	
	
	
	
	
	
		
			
			
			
			
			
		
	
	
	
		
	
	
		
	
I have hard coded drive I to test it, but it keeps saying drive not found. Is there any namespace i need to import perhaps when using this?
	
		
			
		
		
	
				
			When a usb is inserted it picks it up and formats. I have tried with this code, but it keeps telling me drive not found. And i know the drive exists.
			
				VB.NET:
			
		
		
		Dim DrvToFormat As String = "I:"
        Dim ret As DialogResult = MessageBox.Show("Are you sure you want to format drive " & DrvToFormat & " ? All data will be lost.", "Warning...", MessageBoxButtons.YesNo, MessageBoxIcon.Warning)
        If ret = Windows.Forms.DialogResult.Yes Then
            Shell("Format " & DrvToFormat)
        End If
    End SubI have hard coded drive I to test it, but it keeps saying drive not found. Is there any namespace i need to import perhaps when using this?
 
	 
 
		