Option ExplicitPrivate Sub Command1_Click() '设置共享
    Dim wsh As Object
    Set wsh = CreateObject("Wscript.shell")
    wsh.run "net share AAA=D:\SQLXML", 0
    Set wsh = Nothing
    
End SubPrivate Sub Command2_Click() '取消共享
    Dim wsh As Object
    Set wsh = CreateObject("Wscript.shell")
    wsh.run "net share AAA /delete", 0
    Set wsh = Nothing
End Sub