473,403 Members | 2,323 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Trigger/Event when a usb thumb drive is inserted? (vista)

Is there a way to catch an event/trigger that *might* be fired when a
usb thumb drive is inserted into a Vista PC?

The reason I ask is that I'd like to catch that event and back up the
content of the thumb drive to the local machine with a custom process.

I realize there might be some security issues with this...but it would
sure be useful if I could do it.

-Thx

Jun 5 '07 #1
2 3717
<ki*******@gmail.comwrote in message
news:11**********************@n4g2000hsb.googlegro ups.com...
Is there a way to catch an event/trigger that *might* be fired when a
usb thumb drive is inserted into a Vista PC?

The reason I ask is that I'd like to catch that event and back up the
content of the thumb drive to the local machine with a custom process.

I realize there might be some security issues with this...but it would
sure be useful if I could do it.
Look into Autoplay. When the USB drive or CD or other media is inserted a
list of apps appears. You can get your app added to this list and the user
can decide whether to have your app run always or have it as an option. The
WIA sdk that can be downloaded from MS will allow you to easily add your app
to this list.
>
-Thx

Jun 6 '07 #2

"Michael C" <no****@nospam.comwrote in message
news:eu**************@TK2MSFTNGP03.phx.gbl...
<ki*******@gmail.comwrote in message
news:11**********************@n4g2000hsb.googlegro ups.com...
>Is there a way to catch an event/trigger that *might* be fired when a
usb thumb drive is inserted into a Vista PC?

The reason I ask is that I'd like to catch that event and back up the
content of the thumb drive to the local machine with a custom process.

I realize there might be some security issues with this...but it would
sure be useful if I could do it.

Look into Autoplay. When the USB drive or CD or other media is inserted a
list of apps appears. You can get your app added to this list and the user
can decide whether to have your app run always or have it as an option.
The WIA sdk that can be downloaded from MS will allow you to easily add
your app to this list.
Good if you want to run an app for a particular thumb drive being inserted.

If you want to detect *any* removable USB drive, override WndProc and listen
for WM_DEVICECHANGE. You get a DEV_BROADCAST_VOLUME structure which tells
you the drive letter.

http://msdn2.microsoft.com/en-us/library/aa363480.aspx
http://msdn2.microsoft.com/en-us/library/aa363249.aspx
>>
-Thx


Jun 6 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Luklrc | last post by:
Hi. I have a problem I hope someone can help me with. I have a database of events. Each event has a date and a duration (days). What I need to do is to be able to display search for events...
1
by: shottarum | last post by:
I currently have 2 tables as follows: CREATE TABLE . ( mhan8 int, mhac02 varchar(5), mhmot varchar(5), mhupmj int )
11
by: serge | last post by:
When i debug a trigger is it possible to add a WATCH on the INSERTED or DELETED? I think not, at least I couldn't figure out a way to do so. Does someone have a suggestion on how I can see the...
2
by: jcandersen | last post by:
Hi. I need to make a trigger which fires when after an UPDATE is done on table A in database X. The trigger must perform a statement which copies some of the data from the update to table B in...
6
by: wugon.net | last post by:
Hi , Anyone know how to monitor db2 trigger activity ? We suffer some trigger issue , and we try to monitor trigger's behavior use event monitor and db2audit, but both tools can not get...
0
by: wugon.net | last post by:
Hi , Anyone know how to monitor db2 trigger activity ? We suffer some trigger issue today and we try to monitor trigger's behavior use event monitor and db2audit, but both tools can not get...
5
by: Hubert Trzewik | last post by:
Hi, I want to have all-in-one trigger, defined like this: CREATE TRIGGER MyInsertDeleteUpdateHandler ON MyTable FOR DELETE, INSERT, UPDATE AS BEGIN (...)
3
by: PW | last post by:
Hi, I just bought a SanDisk Cruzer 4GB "U3" thumb drive. Is it possible to run an Access 2003 MDE off of one, complete with data? If so, what would I have to do to get it to work? Just...
2
by: HotFrost | last post by:
Hello everyone, i am trying to work with linked servers... The local server is the one used by UPS worldwide software (it is Microsoft SQL Server Desktop Engine, v 8.00.2050). The linked server...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.