Hi all,
How can I create a network share for a local directory? I found it
quite easy to come up with some methods to set access rights for
directories and / or files, but I can't find any working examples
(there aren't many anyway) of how to create a network share...
Thanks in advance for your help
Tim
zacks@construction-imaging.com - 28 Aug 2007 15:38 GMT
> Hi all,
>
[quoted text clipped - 6 lines]
>
> Tim
Open a Command Prompt window and enter:
net share /?
Use the Process class to run the appropriate command illustrated by
the help message to create the share.
Ignacio Machin ( .NET/ C# MVP ) - 28 Aug 2007 15:48 GMT
Hi,
> Hi all,
>
[quoted text clipped - 4 lines]
>
> Thanks in advance for your help
There are several ways, you can use net.exe in a hidden window or you can
use Pinvoke: http://www.codeproject.com/dotnet/pinvokeaddshare.asp
or even WMI
I'm sure if you look into the archives you will find the answer.