Jump to content

Recommended Posts

Posted

I want two snippets of vb.net code converted to autoit.Please help.

The two snippets are:

Dim fs AsFileSystemSecurity = File.GetAccessControl(txtbxBrowseFolderName.Text)

fs.AddAccessRule(NewFileSystemAccessRule(Environment.UserName, FileSystemRights.FullControl, AccessControlType.Deny))

File.SetAccessControl(txtbxBrowseFolderName.Text, fs)
Dim fs AsFileSystemSecurity = File.GetAccessControl(txtbxBrowseFolderName.Text)

fs.RemoveAccessRule(NewFileSystemAccessRule(Environment.UserName, FileSystemRights.FullControl, AccessControlType.Deny))

File.SetAccessControl(txtbxBrowseFolderName.Text, fs)
  • Moderators
Posted

Reddragon, you explain very clearly what you want, but don't show what you have tried on your own. This forum is dedicated to helping people with their own scripts; it is not a place where you put in a request and someone barfs up code for you. Since you don't seem to be familiar with the vb code, I would suggest starting simply with icacls. Something like this should get you started; Google icacls for more information:

$sFile = @DesktopDir & "\PCs.txt"
    ShellExecute("icacls", $sFile & " /grant Administrator:(D,WDAC)")

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...