Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / August 2007

Tip: Looking for answers? Try searching our database.

How to create a network share?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tim - 28 Aug 2007 15:31 GMT
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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.