Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB Checking File Security

Status
Not open for further replies.

UncleT

Programmer
Sep 26, 2001
133
US
Hello,

I've written a VB application that is a container for Crystal reports. It is set up to look at a certain location on the network and under that location there are folders which in the application will turn into buttons. For example if there is a Folder called "ARREST" then there will be an "ARREST" button on the main form. Under that folder are various crystal reports for the users to view. Right now everyone can view every report. I am looking at putting some security in the program. Is there a way in vb to check the Windows security for files and Folders. Any help or Code would be appreciated.

Thanks in advance,

UncleT
 
If you add the users to NT groups, then add those groups to the directories as the only ones that can access a certain directory, the operating system will take care of the security part. All you would have to do is test if the file can be accessed.

At any rate, once you assign security to a directory, the only ones that are allowed to access it can run the reports, whether or not you check from VB.

I suspect there are some network API functions that will let you discover the permissions on a directory, but I don't know them off-hand.

"I think we're all Bozos on this bus!" - Firesign Theatre [jester]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top