Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

check permissions in a local folder with with visual basic

Posted on 2011-09-28
1
Medium Priority
?
196 Views
Last Modified: 2012-06-21
I would like to know how to check the permissions or rights in a local folder with visual basic.

for example

I had "c:\test", I would like to know what rights or permissions as this folder

0
Comment
Question by:altariamx2003
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 25

Accepted Solution

by:
Luis Pérez earned 2000 total points
ID: 36813066
Imports System.IO
Imports System.Security.AccessControl
...

Dim folder As DirectoryInfo = New DirectoryInfo("c:\test")
Dim security As DirectorySecurity = folder.GetAccessControl()

'In this object, "security", you have a lot of information about access rules, audit rules, and so on about the folder.

'Check the MSDN documentation for the DirectorySecurity class and how to deal with it:
http://msdn.microsoft.com/en-us/library/system.security.accesscontrol.directorysecurity.aspx

Hope that helps.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

704 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