I recently downloaded 'Visual Basic 2005 Express Edition BETA 2'
I've read some of the help files, watched some tutorials and am pretty familiar (but still new) to the software.
I was wondering if anyone could tell me if and how I could go about making this software which processes information likes so -
- User inserts a USB storage device.
- User clicks button.
- Application silently searches for filename named 'JE1.txt' on USB storage device.
- If the filename is found on the device the application opens a simple 'messagebox' with 'Correct' or something in it that I can change. If the filename is not found a mesagebox with 'Incorrect' appears.
Any way you think I can build this Or will I need other software
Thanks in advance,
James
PS. I'm not that experienced so please keep it simple!

A USB project - please help! How can I do it?
Les Thompson
I am using Visual Basic 2005 Express edition and it comes up with loads of problems with the code!
Where do I put it in - anyone !
Please!
But thanks for your help anyway! I'm bad at this, remember, so please can someone tell me how to get this working Maybe just send me a solution folder for it
Please help
Thanks again,
James
JAMESEVS <AT> GMAIL <DOT> COM
Macy-Mike
using System;
using System.Management;
class WMIEvent
{
public static void Main()
{
WMIEvent we = new WMIEvent();
ManagementEventWatcher w = null;
WqlEventQuery q;
ManagementOperationObserver observer = new ManagementOperationObserver();
// Bind to local machine
ManagementScope scope = new ManagementScope("root\\CIMV2");
scope.Options.EnablePrivileges = true; //set required privilege
try
{
q = new WqlEventQuery();
q.EventClassName = "__InstanceOperationEvent";
q.WithinInterval = new TimeSpan(0,0,3);
q.Condition = @"TargetInstance ISA 'Win32_DiskDrive' ";
w = new ManagementEventWatcher(scope, q);
w.EventArrived += new EventArrivedEventHandler(we.DiskEventArrived);
w.Start();
Console.ReadLine(); // block main thread for test purposes
}
catch(Exception e)
{
Console.WriteLine(e.Message);
}
finally
{
w.Stop();
}
}
public void DiskEventArrived(object sender, EventArrivedEventArgs e)
{
//Get the Event object and display its properties (all)
foreach(PropertyData pd in e.NewEvent.Properties)
{
ManagementBaseObject mbo = null;
if(( mbo = pd.Value as ManagementBaseObject) != null)
{
Console.WriteLine("--------------Properties------------------");
foreach(PropertyData prop in mbo.Properties)
Console.WriteLine("{0} - {1}", prop.Name, prop.Value);
}
}
}
}
Good Luck!
Tell me if this helps.