473,769 Members | 3,108 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

how to detect insertion of USB stick ?

Dear all,

For one on my customer application I would like to implement the following
facilities:

As soon as USB stick is inserted I need to run a small application which
will take care of copiing predifined folders and store then at a particular
place on the USB key.

For that I need to:

1- identify when a key is plug in
2- start an autorun from the key which will request to start the backup
procedure
3- the running application will copy folder to USB

How can I perfome such operation ?
Especially the detection of USB key insertion and starting the aurotun

thnaks for help to point me to some tips
regards
serge
Oct 28 '08 #1
1 7483
On Oct 28, 9:42*am, calderara <calder...@disc ussions.microso ft.com>
wrote:
Dear all,

For one on my customer application I would like to implement the following
facilities:

As soon as USB stick is inserted I need to run a small application which
will take care of copiing predifined folders and store then at a particular
place on the USB key.

For that I need to:

1- *identify when a key is plug in
2- start an autorun from the key which will request to start the backup
procedure
3- the running application will copy folder to USB

How can I perfome such operation ?
Especially the detection of USB key insertion and starting the aurotun

thnaks for help to point me to some tips
regards
serge
Check out this link. I haven't gotten a chance yet to sift through the
code but I think it may point you in the right direction. I hope
you're familiar with Win32. http://www.codeproject.com/KB/system/DriveDetector.aspx
Oct 30 '08 #2

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

Similar topics

0
1389
by: Viper99 | last post by:
Need to detect (receive notification) for the insertion/removal of PCMCIA devices on Windows 2000/XP in a C# .Net application. Was able to do this in ATL COM app using CWnd::OnDeviceChange().
20
3871
by: Patrick Guio | last post by:
Dear all, I have some problem with insertion operator together with namespace. I have a header file foo.h containing declaration of classes, typedefs and insertion operators for the typedefs in a named namespace namespace foo { class Foo
5
6061
by: John N. | last post by:
Hi All, Here I have a linked list each containing a char and is double linked. Then I have a pointer to an item in that list which is the current insertion point. In this funtion, the user hits the right and left keys to move this insertion point (cursor) Here is the problem:
9
37210
by: Paul Steele | last post by:
I am writing a C# app that needs to periodically poll for cdroms and usb storage device insertions. I've looked at the WMI functions but haven't found anything all that useful. The closest is Win32_DiskDrive, but it doesn't seem to return any information on cdrom devices. I suspect there might be a Win32 API call, but I haven't found any info yet using Google. Is there a way to achieve this in C#?
4
5808
by: sanjana | last post by:
hi can anyone help me with this i want to write a code in c#.net which detects usb storage and media card insertion can anyone help me with this?? thanx
1
5593
by: Steve Marshall | last post by:
Hi All, Apologies if this has come up before, but how can I set up something that will notify me when a removeable drive (like a USB drive or CompactFlash card) is inserted into its slot? Ideally I would like some sort of event that would call my code when it happens. The FileSystemWatcher object doesn't seem able to do this, unless I am missing something. Thanks
1
1613
Ali Rizwan
by: Ali Rizwan | last post by:
How to print a flexgrid instead of whole form How to set print quality How to detect CDROM, that is the required cd is inserted or not
0
1254
by: Tim Kelley | last post by:
Is there a facility in C# to detect the insertion of an SD or CF card? Thanks
1
2536
by: =?Utf-8?B?Sm9lIE1pbGxlcg==?= | last post by:
I am a developer and a photographer, and I am trying to write a windows service that can recieve a notification that a compact flash card, or an SD card has been insterted into a card reader slot. The card reader is a multi-format (CF/SD/MMC, etc) reader connected to the machine by USB. I want the service to recieve a notification of the card insertion, so it can grab the files, read the EXIF/IPTC data, and process the files (cataloging,...
0
9423
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10211
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10045
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...
0
9863
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7409
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
6673
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
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3959
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
3
2815
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.