Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Create a folder with full Sharing Rights

Create a folder with full Sharing Rights

Scheduled Pinned Locked Moved Visual Basic
csharpdatabasesql-serversysadmin
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    pdnet
    wrote on last edited by
    #1

    Hi All, I am creating an application in vb.net 2008 and Sql server 2005 I want to create a shared folder in the Server system, Than can be acceasable from all the Other System. And This file using all the User Access Rights. How can I create the Access Rights

    Arindam Banerjee Sr. Software Developer Rance Computer Pvt Ltd. Kolkata (India)

    K D 2 Replies Last reply
    0
    • P pdnet

      Hi All, I am creating an application in vb.net 2008 and Sql server 2005 I want to create a shared folder in the Server system, Than can be acceasable from all the Other System. And This file using all the User Access Rights. How can I create the Access Rights

      Arindam Banerjee Sr. Software Developer Rance Computer Pvt Ltd. Kolkata (India)

      K Offline
      K Offline
      Khanna Gaurav
      wrote on last edited by
      #2

      Use following code Dim strPath As String = "C:\Gaurav" Dim dir As String = IO.Path.Combine(strPath, "Temps") Dim dirSecurity As New System.Security.AccessControl.DirectorySecurity Dim rul As New Security.AccessControl.FileSystemAccessRule("Everyone", Security.AccessControl.FileSystemRights.FullControl, Security.AccessControl.AccessControlType.Allow) dirSecurity.AddAccessRule(rul) IO.Directory.CreateDirectory(dir, dirSecurity) Dim sharename As String = "ServerFolder" Dim cmdstring As String = "cmd /c net share """ & sharename & """=""" & dir & """" & " /unlimited" Shell(cmdstring)

      1 Reply Last reply
      0
      • P pdnet

        Hi All, I am creating an application in vb.net 2008 and Sql server 2005 I want to create a shared folder in the Server system, Than can be acceasable from all the Other System. And This file using all the User Access Rights. How can I create the Access Rights

        Arindam Banerjee Sr. Software Developer Rance Computer Pvt Ltd. Kolkata (India)

        D Offline
        D Offline
        Dave Kreskowiak
        wrote on last edited by
        #3

        The basic code behind creating a share can be found here[^]. It's in C#, but is easily translatable to VB.NET using any online code conversion tool.

        A guide to posting questions on CodeProject[^]
        Dave Kreskowiak Microsoft MVP Visual Developer - Visual Basic
             2006, 2007, 2008

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups