Click here to Skip to main content
15,886,812 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Ok this should be fairly simple. Lets say I have Drive "Q" that I don't want users to be able to access but I want my application to. Is there some setting some place that I have to enable to get this to work. I have a file reader that I wrote in VB and it is able to access the drive even though I don't have privelages to do so, but when I do the same thing with C++ I get access denied. I'm sure I'm just missing some setting some place.

Thanks!
Posted

1 solution

I found this[^] on stackoverflow:

You could setup folder security to prevent the user's from accessing/deleting from the drive.
Give the application a set of credentials it can use to access/manipulate the drive.
You could either setup the system to run as a specified user (eg "run as" or have it running as a windows service), or use impersonation[^] to impersonate a user credential to access the drive.
 
Share this answer
 
Comments
MacRaider4 25-Aug-11 7:31am    
I'll give that a look when I get back from a trip, should be sometime this weekend. I'll let you know then if I have any further questions. Thanks!
MacRaider4 29-Aug-11 13:49pm    
When in doubt, half ass it :-) Ok, since there doesn't seem to be a easy way to do this. I'm going to hide the drive maps in the group policy, this way the application can still see them and it will hide the drives from about 99.8% of the users on the network. The ones that would know enough how to view the contents are smart enough not to.
Hopefully some day they'll make it so you can assign rights to applications.

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