Solved

Limit access to a removeable drive programatically

Posted on 2006-06-22
8
216 Views
Last Modified: 2011-09-20
How can I programatically limit access to a removeable drive in Windows or give access to it.  For example, I would like to password protect the drive.  If the password is supplied, let windows/current user have access to it.
0
Comment
Question by:bc4942
  • 2
  • 2
8 Comments
 
LVL 20

Expert Comment

by:alainbryden
ID: 16961879
That is something built onto a removable drive but it has nothing to do with visual basic. If you want a password protected removable drive then you need to buy a password protectable removable drive. (Most large ones come with this feature, just right click on the drive and alter it's properties)
0
 

Author Comment

by:bc4942
ID: 16962292
so there is no api call or anything with windows that would let you "disconnect" or "reconnect" a drive?  Interesting.
0
 
LVL 30

Expert Comment

by:nmcdermaid
ID: 16964939
There probably is an API but the user would actually have to run your VB App to activate it...

You could put your app in the statrup but there are many ways around that.
0
 

Author Comment

by:bc4942
ID: 16969493
I understand...Full disclosure might be needed here..  I have created a CDROM partition on a USB key (like U3)  When the Key is inserted, 2 drives are added:  a "cd-rom" and a removeable disk (just like U3).  On the CDROM there are 2 files.  My .exe and autorun.inf.  My .exe currently scans the Windows removeable drives to find the one that is the key and then executes a custom menu of items on the key (similar to U3).  Looking to limit access to that dive.
0
 
LVL 20

Accepted Solution

by:
alainbryden earned 500 total points
ID: 16970550
Oh I see. Well then I would say the best thing to do would be to encrypt the contents of that drive and add a small decryptor to your accessing program. I know that this is the "if all else fails" solution, but it may come down to that.
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question