mark 创建共享文件夹
Try
Dim managementClass As New System.Management.ManagementClass("Win32_Share")
Dim inParams As object = managementClass.GetMethodParameters("Create")
Dim outParams As object
inParams("Description") = "注释"
inParams("Name") = "test共享"
inParams("Path") = "d:\test"
inParams("Type") = &H0
outParams = managementClass.InvokeMethod("Create", inParams, Nothing)
If CUInt(outParams.Properties("ReturnValue").Value) <> 0 Then
msgbox("设置失败")
Else
msgbox("OK")
End If
Catch ex As exception
msgbox(ex.message)
End Try