I have an installer that creates a directory on the user specified location. and the owner of this directory has to be Network Service account. After creating directory with the administrator, I grant the permissions to this directory for Network Service account using icacls.
Now, I realize that the parent directories to this directory should have right permissions to Network Service account. But, if I traverse to the top level directory and try to grant permissions to Network Service account on these directories using icacls, I observe that icacls tries to tough all the files in all these directories and consuming lot of time to do this. I even tried with some options of icacls but in vain.
Please let me know if there is any other way to do this?
Thanks.