My Question Is Regarding Vb.net about accessing ACL Editor to check user permission?

Kara

New member
I has successfully got the result of getting/reading permission using cacls.exe. But now my problem is that i wanted to compare the output with my own user reading i.e for example say the output i got was \BUILTIN\Users:R but i want to compare it with \BUILTIN\Users:F . How do i do that using if statement??

\BUILTIN\Users:R = a
\BUILTIN\Users:F= b

IF a =b then
success
else
failure.

my code is as follows:

//Code to get the user permission in an msgbox.
Dim _cmdLine As String = "E:\Windows\regedit.exe"
Try
Dim p As New Process
p.StartInfo.FileName = "cacls.exe"
p.StartInfo.Arguments = _cmdLine
p.StartInfo.RedirectStandardOutput = True
p.StartInfo.UseShellExecute = False
p.StartInfo.WindowStyle = Diagnostics.ProcessWindowStyle.Minimized
p.StartInfo.CreateNoWindow = True
p.Start()
Dim result As String = (p.StandardOutput.ReadToEnd.ToString)
MsgBox(result)
Catch ex As Exception
End Try
End Sub
End Class


It would be helpful if i get a sample code for the above file and the mentioned condition.

I'm working on this for my Masters Degree project (BENCHMARK SECURITY TOOL).

Also it would be helpful if i get a sample code on accessing the LOCAL SECURITY POLICY.

I'm USING VS2008 for my software development.

Regards.
Karthik
 
Back
Top