network share code
-
Hi, How can I create a network share using .net code? I've search every forum and articles that i can find on the internet but still didn't came to any solution that suited for me. I'm creating a simple application that create a folder and share the folder to the network and unshare the previous folder with the same network sharename
-
Hi, How can I create a network share using .net code? I've search every forum and articles that i can find on the internet but still didn't came to any solution that suited for me. I'm creating a simple application that create a folder and share the folder to the network and unshare the previous folder with the same network sharename
There is nothing in the .NET Base Class Library that will do this. You need to either P/Invoke the appropriate Win32 API functions to setup the Share and appropriate rights or you can do it using WMI and the System.Management namespace. I don't have any code to share with you because I've never had to do it. You could look at this[^] WSH scripting, using WMI, that does approximately what you want. You could use this as a template to create your own code in VB.NET. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
-
There is nothing in the .NET Base Class Library that will do this. You need to either P/Invoke the appropriate Win32 API functions to setup the Share and appropriate rights or you can do it using WMI and the System.Management namespace. I don't have any code to share with you because I've never had to do it. You could look at this[^] WSH scripting, using WMI, that does approximately what you want. You could use this as a template to create your own code in VB.NET. RageInTheMachine9532 "...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
Thanks for the link. I'll try the script...