Shell("net share 目录名")

解决方案 »

  1.   

    The syntax of this command is:
    NET SHARE sharename
              sharename=drive:path [/USERS:number | /UNLIMITED]
                                   [/REMARK:"text"]
                                   [/CACHE:Manual | Automatic | No ]
              sharename [/USERS:number | /UNLIMITED]
                        [/REMARK:"text"]
                        [/CACHE:Manual | Automatic | No ]
              {sharename | devicename | drive:path} /DELETENET SHARE makes a server's resources available to network users. When
    used without options, it lists information about all resources being
    shared on the computer. For each resource, Windows reports the
    devicename(s) or pathname(s) and a descriptive comment associated with it.
    sharename          Is the network name of the shared resource. Type
                       NET SHARE with a sharename only to display information
                       about that share.
    drive:path         Specifies the absolute path of the directory to
                       be shared.
    /USERS:number      Sets the maximum number of users who can
                       simultaneously access the shared resource.
    /UNLIMITED         Specifies an unlimited number of users can
                       simultaneously access the shared resource
    /REMARK:"text"     Adds a descriptive comment about the resource.
                       Enclose the text in quotation s.
    devicename         Is one or more printers (LPT1: through LPT9:)
                       shared by sharename.
    /DELETE            Stops sharing the resource.
    /CACHE:Automatic   Enables offline client caching with automatic reintegration
    /CACHE:Manual      Enables offline client caching with manual reintegration
    /CACHE:No          Advises client that offline caching is inappropriate
      

  2.   

    这个问题前几天我刚问过,你可以在以下网址http://www.csdn.net/expert/topic/315/315197.xml?temp=.5605432找到答案.