473,387 Members | 1,669 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How to get userid permission for a specific folder via VBA

How can I use the VBA Code to extract the userid's (not known) access right permission for a particular folder in Windows?
Jan 24 '13 #1
4 4932
zmbd
5,501 Expert Mod 4TB
I've ran across a few API calls that may be able to do this; however, I'm a tad out of my depth with them such that I hesitate to even offer a starting point.

Either Rabbit or ADezii might have a good place to start...
Jan 24 '13 #2
Rabbit
12,516 Expert Mod 8TB
You can use a WMI object to query the DirectorySecurity Class.

http://msdn.microsoft.com/en-us/libr...ysecurity.aspx

If groups are used, you will then have to run an LDAP query to see if the user is in said group.
Jan 24 '13 #3
zmbd
5,501 Expert Mod 4TB
And Rabbit just finished the first part of the:
http://bytes.com/topic/access/insigh...(WMI) Tutorial which should provide some further guidance.

@Rabbit:
The API calls I saw used the "advapi32.dll" however, they were very sparse on the actual usage and just provided some information about how to alter the security and one sort-a-kinda-alluded to the fact that with the user name/SID you could bitwise compare for security rights.
Jan 24 '13 #4
Rabbit
12,516 Expert Mod 8TB
While I have used the WMI object in the past, I have not used it to query the DirectorySecurity. I am guessing that it uses whatever ID was used to add the permission. So if they used a domain user, then the domain user ID will show up there. If they used a security group, then the name of the security group would show up.
Jan 24 '13 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: ALI-R | last post by:
how can I get a list of file names in an specific folder? thanks
4
by: Santaji | last post by:
Hi, We have an ASP.NET application which needs to write some files on the disk. For these we need to give ASP.NET user the Write permission for that particular folder. This is possible from...
1
by: nafogel | last post by:
Hi, I am kinda familiar with html, but i am having a problem. I am working on a menu system for a handheld gaming device (PSP). I want the menu to be able to display all files with a certain...
2
by: Bill Fallon | last post by:
I have a VS2005 VB.Net windows form application deployed to a share drive. The windows explorer security permissions for this application (.exe) file is set for Everyone with List Folder/Read Data...
2
jaccess
by: jaccess | last post by:
I was wondering if there is a simple way to open a specific folder from an access form button. I have a form that a user can enter a date range and either view or print reports based on the date...
5
by: Alice | last post by:
I'm trying to upload all .txt files from a specific folder using the following code, but it didn't work. HELP The problem lies in DoCmd.TransferText acImportFixed, "Imperial Import...
0
by: raviranjan249 | last post by:
How to search for a particular string in a specific folder in all files throgh asp. If you have solution then pm to me <email removed>
1
by: mpetter | last post by:
Hi guys ! How Can I Create a contact item(Outlook 2003) in specific folder under default folder? I have this situation: Set myolApp = CreateObject("Outlook.Application") Set myNameSpace =...
2
mafaisal
by: mafaisal | last post by:
Hello Experts I am Using vb.net2005 How To Know a File or Folde is Exist in Specific Folder Using vb.net2005 eg : test.txt this file is exist in D:\Faisal Hw to check this Faisal
3
by: Ned White | last post by:
Hi All, I would like to create a httphandler to set text watermark on image files before it gets displayed to the user. But this handler must listen specific folder or virtual directory(on same...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.