You have tagged the question ASP.NET so I am considering you are talking about a web application.
I don't think it would be possible because a web application shouldn't be allowed to access devices on a client machine. That would be a security threat to the client machine.
This[
^] thread may help you.