J
Johan
My problem is that I want to set file permission on a file on the
network using WMI, but the folder might not be mapped which ,as far as
I know, WMI needs. So my solution to this would be to map the folder
in runtime, but for some reason WMI does not seem to get that I have
done the mapping. I still get a "Not Found" exeption. If I check the
mapping from within the code it exists.
Here is a part of the code I use.
Dim FileName as string = "Test.txt"
Dim UNC as string = Any UNC path
Dim Mapped as string
Mapped = 'Create a mapping to the UNC path
Console.Write(system.IO.Directory.Exists(Mapped))
Dim objFile As New ManagementObject(New
ManagementPath("Win32_LogicalfileSecuritySetting='" + _
Mapped.Replace("\", "\\") + "'"))
Console.Write(objFile.GetText(TextFormat.Mof)) 'Here we get a "Not
Found" exieption
Thanks
Johan
network using WMI, but the folder might not be mapped which ,as far as
I know, WMI needs. So my solution to this would be to map the folder
in runtime, but for some reason WMI does not seem to get that I have
done the mapping. I still get a "Not Found" exeption. If I check the
mapping from within the code it exists.
Here is a part of the code I use.
Dim FileName as string = "Test.txt"
Dim UNC as string = Any UNC path
Dim Mapped as string
Mapped = 'Create a mapping to the UNC path
Console.Write(system.IO.Directory.Exists(Mapped))
Dim objFile As New ManagementObject(New
ManagementPath("Win32_LogicalfileSecuritySetting='" + _
Mapped.Replace("\", "\\") + "'"))
Console.Write(objFile.GetText(TextFormat.Mof)) 'Here we get a "Not
Found" exieption
Thanks
Johan