I'm creating a share for my appfolder, using WMI:
Dim apath As String = IO.Directory.GetCurrentDirectory()
Dim Share_Info As String() = {apath, "MyApp", 0}
Dim Win_Shares As ManagementClass = New ManagementClass("Win32_Share")
Try
Win_Shares.InvokeMethod("Create", Share_Info)
Catch ex As System.Management.ManagementException
MessageBox.Show(ex.ToString)
Return
Finally
Win_Shares.Dispose()
End Try
MessageBox.Show("Share: " + Share_Info(0) + " success!")
This works perfect for Win2000/XP. But for Win98/Me the share is readonly.
Have tried with API functions also - same result or worse.
It's driving me nuts. I just can't figure out, what parameter to declare readwrite access to the folder.
Fritz
Dim apath As String = IO.Directory.GetCurrentDirectory()
Dim Share_Info As String() = {apath, "MyApp", 0}
Dim Win_Shares As ManagementClass = New ManagementClass("Win32_Share")
Try
Win_Shares.InvokeMethod("Create", Share_Info)
Catch ex As System.Management.ManagementException
MessageBox.Show(ex.ToString)
Return
Finally
Win_Shares.Dispose()
End Try
MessageBox.Show("Share: " + Share_Info(0) + " success!")
This works perfect for Win2000/XP. But for Win98/Me the share is readonly.
Have tried with API functions also - same result or worse.
It's driving me nuts. I just can't figure out, what parameter to declare readwrite access to the folder.
Fritz