Jump to content

_Net_Share_ShareAdd Permission

Recommended Posts


I'm trieng to find out since weeks now how I can set permission for the share itself that got create with


The share gets created without any problem, but the "Share permissions" are missing. They should be set to Full access for every one. See attachment that shows the missing permissions.

With a simple dos command like net share test=C:\test /GRANT:Everyone,FULL it does create a share and the also the proper permissions, but I'd like to use Autoit for creation and not doing it via a Run(@compspec ....) command.


For setting the file permissions I use:

Run(@ComSpec & ' /k icacls.exe "' & $FullPath & '" /grant "' & $samAccount & ':(CI)(OI)(M)" ', '', @SW_HIDE)

May be there is also any easier way to handle this?


Thanks for any help on this!


Share this post

Link to post
Share on other sites

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

  • Create New...