I've figured out how to create a share by using this:
But, the share created above allows users to read and write to it. I'm looking for a way to create a read-only share from vb.net. Ideally, I would like to set it up to be password protected also, but read only is much more important to me.
Thanks for your help.
VB.NET:
Dim objWMI As Object = GetObject("winmgmts:\\localhost\root\cimv2")
Dim objShare As Object = objWMI.Get("Win32_Share")
intRC = objShare.Create(strPath, strName & "$", intType, intMaxAllowed, strDescr)
But, the share created above allows users to read and write to it. I'm looking for a way to create a read-only share from vb.net. Ideally, I would like to set it up to be password protected also, but read only is much more important to me.
Thanks for your help.