Hi everybody,
I need to remove access to a shared directory before to execute a
process on the directory.
And put back the access on it after the execution.
So I wanted to set the permission of the Everyone user to Deny, execute
my process, and restore the permission to Allow.
There is the NET SHARE command, but it's to create or delete a share.
We don't have the RMTSHARE.exe tool and we cannot install another tool.
I readed some things about WMI and csharp but I never see an exemple
with the permisson on a share.
There are a lot of things about the permission about the folder, but I
want just the share.
So, I wanted to use WMI. I saw exemple to create a new permission or
delete one, but I cannot read the permission on the share.
Maybe somebody has some exemple to help me.
I use Visual Studio 2005 (and the framework 2.0). And the share is on a
win 2003 server.
Thanks in advance
Jerome