Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Imports System.IO
- Imports System.Security.AccessControl
- Public Class Form1
- Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
- Dim FilePath As String = "C:\Users\rytho\OneDrive - University of Maine System\Desktop"
- Dim UserAccount As String = "Everyone"
- Dim FileAcl As New FileSecurity
- ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''Change to:>> AccessControlType.Deny << to remove priviledges
- FileAcl.AddAccessRule(New FileSystemAccessRule(UserAccount, FileSystemRights.Modify, AccessControlType.Allow))
- Dim FileInfo As New FileInfo(FilePath)
- FileInfo.SetAccessControl(FileAcl)
- End Sub
- End Class
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement