473,698 Members | 2,451 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 3740
<ki*******@gmai l.comwrote in message
news:11******** **************@ n4g2000hsb.goog legroups.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******** ******@TK2MSFTN GP03.phx.gbl...
<ki*******@gmai l.comwrote in message
news:11******** **************@ n4g2000hsb.goog legroups.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_V OLUME 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
3729
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 on some web pages. My problem is that if an event is on say 15 nov 2004 and has a duration of 3 days, at the moment if someone searches for the
1
15419
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
37025
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 values? I did try to do something like INSERT INTO TABLE1(NAME) SELECT NAME FROM INSERTED
2
2989
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 database Y on the same server. My question is: Can I access the data which caused the trigger to fire or just get an indication of which entry in table A had been updated? Best Regards
6
6828
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 trigger's sql statment and cost, have other tools can get trigger's executing sql statment and cost ? our test case as follow: Env:
0
2628
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 trigger's sql statment and cost, have other tools can get trigger's executing sql statment and cost ? our test case as follow: Env:
5
18666
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
2854
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 curious. No Biggie! I thought I'd take a break from writing code and try something different. I guess I could go fishing :-) -paulw
2
5826
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 is 2005 MS server. on update/insert event for some table i hooked up the trigger that connects to linked server and updates the record in some DB. To test, i create a stored procedure that updates the record in UPS table that has that trigger....
0
8676
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9029
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
6522
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5860
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4370
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4619
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3050
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2332
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2006
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.