1

I want to open an application which is developed in windowsforms using C# in PC when connecting a PDA device via USB connection.

Question is:

  1. How do I check the particular USB device has connected (Eg:PDA)?
  2. how do I launch the specific application when connecting a particular USB (Eg:PDA)?
Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
  • When the USB device is connected to the Server? – H H Jul 22 '13 at 11:42
  • Welcome to SO. Please clarify your question. How can you _"open an ASP.NET application"_, isn't that just visiting a given URL with a browser? Explain who connects what kind of USB device to what computer, what application of yours is running on that computer, what you want that application to do and what _you_ have tried to solve this. Bear in mind you cannot do anything useful from a web page, regarding the USB. – CodeCaster Jul 22 '13 at 11:42
  • Great anti-virus effort has gone into preventing what you are trying to do. I suggest you re-think your solution. Or look for a hacker site. – rheitzman Jul 22 '13 at 16:57
  • 1
    You can go for windows service. Create your own windows service and install into the machine which you plugin USB. This service is responsible for searching connected USB (you will get lot of stuffs in net to find out connected USB). Once you find out the device you can invoke the application you want. eg: To invoke notepad :- System.Diagnostics.Process.Start("C:\Windows\Notepad.exe") – Vimal CK Jul 23 '13 at 02:55

1 Answers1

0

I don't understand why you tagged the question with ASP.NET. ASP.NET is a server-side technology, and ASP.NET applications are "started" by IIS in response to an HTTP request (typically from a browser).

What you're looking for is to detect a USB device insertion event, and for that you need an application that runs on the client (and have certain permissions).

Here's a thread that would get you started.

Community
  • 1
  • 1
New Dev
  • 48,427
  • 12
  • 87
  • 129