How to create a network share?

T

Tim

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
 
Z

zacks

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

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.
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,
Tim said:
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

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top