Click here to Skip to main content
15,922,007 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
The below coding is to be proper share the folder, but not access to the My Network Places from remote m/c.

How will i solve the above problem????
Please supply the code in right way...

My share folder code is below:-
------------------------------
VB
Try
            Dim managementClass As New ManagementClass("Win32_Share")
            Dim inParams As ManagementBaseObject = managementClass.GetMethodParameters("Create")
            inParams("Description") = "My Description"
            inParams("Name") = "My Folder"
            inParams("Path") = "C:\My Folder"
            inParams("Type") = &H0

            Dim outParams As ManagementBaseObject = managementClass.InvokeMethod("Create", inParams, Nothing)
            If Convert.ToUInt32(outParams.Properties("ReturnValue").Value) <> 0 Then
                MessageBox.Show("Unable to share directory.")
            Else
                MessageBox.Show("Shared folder successfully!")
            End If
        Catch ex As Exception
            MessageBox.Show(ex.Message)
        End Try
Posted
Updated 9-Jan-12 19:42pm
v2

1 solution

Hi,

Please take a look here
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900