Results 1 to 2 of 2

Thread: Simple App - Set local folder as shared and set Permissons. How to?

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Apr 2004
    Posts
    18

    Simple App - Set local folder as shared and set Permissons. How to?

    I am trying to create a simple app that will prompt the user to input a string (will be computer name) and set a pre-existing folder on the computer as shared, give it a name, and set its permissions. It does not have to have any sort of echo function but would be nice.

    Example:

    Prompt entry is abcdefg

    it will set C:\Program Files\Folder as shared \\computer\share_abcdefg$

    remove "everyone" from permissions and add "systems"

    I dont even know where to begin as I could not find anything to do with setting shares in my searches, only local security

    Thanks to anyone that can help!
    SP:.

  2. #2
    l33t! MrPolite's Avatar
    Join Date
    Sep 2001
    Posts
    4,428

    Re: Simple App - Set local folder as shared and set Permissons. How to?

    Originally posted by Scary_Penguin
    I am trying to create a simple app that will prompt the user to input a string (will be computer name) and set a pre-existing folder on the computer as shared, give it a name, and set its permissions. It does not have to have any sort of echo function but would be nice.

    Example:

    Prompt entry is abcdefg

    it will set C:\Program Files\Folder as shared \\computer\share_abcdefg$

    remove "everyone" from permissions and add "systems"

    I dont even know where to begin as I could not find anything to do with setting shares in my searches, only local security

    Thanks to anyone that can help!
    well I dont know if winxp home would have this (not even sure what it might be in win2k and pre-win2k OS)...
    but if you have winxp, or newer, try the "net" command with the share paramter: so for example type this in the command prompt:

    Net Share myNewShare="C:\program files"
    that will create a new share called \\[Computer Name]\myNewShare.


    you can put that in code like this:
    VB Code:
    1. Dim p As New Process
    2.         p.Start("Net.exe", "Share myNewShare=""C:\program files""")


    all that said, I dont know if that is the right way. There may be APIs for doing this, I don't know. I don't know how you can change user permissions for a share, maybe you should ask this in a newsgroup.
    rate my posts if they help ya!
    Extract thumbnail without reading the whole image file: (C# - VB)
    Apply texture to bitmaps: (C# - VB)
    Extended console library: (VB)
    Save JPEG with a certain quality (image compression): (C# - VB )
    VB.NET to C# conversion tips!!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width