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. C#
  4. How to Share Directory programmatically?

How to Share Directory programmatically?

Scheduled Pinned Locked Moved C#
csharpasp-nettutorialquestion
4 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.
  • M Offline
    M Offline
    manojk_batra
    wrote on last edited by
    #1

    Dear All, I have a directory in E drive, which I want to share and allow full control to aspnet via C# programming. I need simple code for it. :) With Regards Manoj

    J J 2 Replies Last reply
    0
    • M manojk_batra

      Dear All, I have a directory in E drive, which I want to share and allow full control to aspnet via C# programming. I need simple code for it. :) With Regards Manoj

      J Offline
      J Offline
      Judah Gabriel Himango
      wrote on last edited by
      #2

      You can make a call to the net command line application net share sharename=c:\folderToShare You can call this from C# using

      System.Diagnostics.Process.Start ("net share myShareName=c:\\folderToShare");

      Tech, life, family, faith: Give me a visit. I'm currently blogging about: Bought a House! Judah Himango

      1 Reply Last reply
      0
      • M manojk_batra

        Dear All, I have a directory in E drive, which I want to share and allow full control to aspnet via C# programming. I need simple code for it. :) With Regards Manoj

        J Offline
        J Offline
        Jared Parsons
        wrote on last edited by
        #3

        If you're wanting to do an API call though you'll need to P/Invoke NetShareAdd NetShareAdd Reference[^] Jared Parsons jaredp@beanseed.org http://spaces.msn.com/members/jaredp/

        M 1 Reply Last reply
        0
        • J Jared Parsons

          If you're wanting to do an API call though you'll need to P/Invoke NetShareAdd NetShareAdd Reference[^] Jared Parsons jaredp@beanseed.org http://spaces.msn.com/members/jaredp/

          M Offline
          M Offline
          manojk_batra
          wrote on last edited by
          #4

          Thanks you a lot for help, Can you provide me a simple C# code for sharing directory and allow particular user full control(aspnet). I am working on using windows xp. :) Thanks & Regards Manoj

          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