Click here to Skip to main content
15,936,709 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
when i an clicking on the pen-drive at that .EXE will be execute from that attached pen-drive and also i want to prevent the copy-paste from pendrive using vb.net.
Posted
Comments
Sergey Alexandrovich Kryukov 28-Nov-11 2:23am    
Why? why?
--SA

1 solution

A pen drive is a small electronic component. You cannot click on it. :-)

If you need to click on anything on screen which represents the pen drive's volume(s), it totally depend on what is it. In you code? Do yourself a favor, develop it. In a file manager using Shell like Explorer? Do yourself even greater favor, don't even think about it. This is intrusive behavior most experience users would rightfully consider unsafe.

Now, preventing copy-paste. I think you mean copy-paste method of Shell which is a "fancy" way to copy file. You see, your volumes on pen drive are no different from any other. You can do it only by using regular administration means, by setting permissions on file system object, using Properties/Security. Essentially, you would make your volume unreadable, which is hardly what you need. I won't advise you to do it.

—SA
 
Share this answer
 
Comments
Manoj K Bhoir 28-Nov-11 10:47am    
5 points SAKryukov. :)
Sergey Alexandrovich Kryukov 28-Nov-11 10:49am    
Thank you, Manoj,
--SA
Dipak V Nakum 29-Nov-11 0:51am    
Dear SAKryukov
i am knowing very well "A pen drive is a small electronic component. You cannot click on it" bcoz i am IT people.if you don't know the ANSWER then why you are commenting. if you don't know ans. then leave it this type of answer is downstate you.
Dipak V Nakum 29-Nov-11 0:49am    
Dear SAKryukov
i am knowing very well "A pen drive is a small electronic component. You cannot click on it" bcoz i am IT people.if you don't know the ANSWER then why you are commenting. if you don't know ans. then leave it this type of answer is downstate you.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900