public sealed class SetAclWrapper : IDisposable
Public NotInheritable Class SetAclWrapper
Implements IDisposable
Dim instance As SetAclWrapper
public ref class SetAclWrapper sealed : IDisposable
[<SealedAttribute>]
type SetAclWrapper =
class
interface IDisposable
end
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
Friend WithEvents Wrapper As New SetAclWrapper(".\SetACL.exe")
Private Sub Test() Handles Button1.Click
Wrapper.SetOwnership("HKCU\Test", True)
Wrapper.SetPermission("HKCU\Test", True, SetAclPermission.Full)
End Sub
Private Sub Wrapper_Started(ByVal sender As Object, ByVal e As SetAclStartedEventArgs) _
Handles Wrapper.Started
ProgressBar1.Value = ProgressBar1.Minimum
Dim sb As New System.Text.StringBuilder
With sb
.AppendLine(String.Format("Arguments: ""{0}""", e.Arguments))
.AppendLine(String.Format("SetACL.exe process id. (PID) is: {0}", CStr(DirectCast(sender, SetAclWrapper).Process.Id)))
End With
Debug.WriteLine(String.Format("Start Time: {0}", Date.Now.ToLongTimeString))
Debug.WriteLine(sb.ToString())
End Sub
Private Sub Wrapper_Exited(ByVal sender As Object, ByVal e As SetAclExitedEventArgs) _
Handles Wrapper.Exited
Dim sb As New Global.System.Text.StringBuilder
With sb
' .AppendLine(String.Format("Arguments: ""{0}""", e.Arguments))
.AppendLine(String.Format("Exit Code: ""{0}""", e.ExitCode))
End With
If Not String.IsNullOrEmpty(e.ErrorMessage) Then
sb.AppendLine(String.Format("Error Information: {0}", e.ErrorMessage))
Process.Start(Wrapper.LogFilePath)
End If
Debug.WriteLine(sb.ToString())
Debug.WriteLine(String.Format("End Time: {0}", Date.Now.ToLongTimeString))
End Sub
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
SetAclWrapper | Initializes a new instance of the SetAclWrapper class. |
Exists | Gets a value indicating whether the SetACL.exe file Exists. |
FilePath | Gets the SetACL.exe filepath. |
LogFilePath | Gets the SetACL.exe log filepath. |
Process | Gets the SetACL.exeProcess instance. |
Dispose | Releases all the resources used by this instance. |
Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
GetHashCode | Serves as the default hash function. (Inherited from Object) |
GetType | Gets the Type of the current instance. (Inherited from Object) |
SetOwnership | Takes ownership of a registry key. |
SetPermission | Takes ownership of a registry key. |
ToString | Returns a string that represents the current object. (Inherited from Object) |
Exited | Event raised when the SetACL.exe process has exited. |
Started | Event raised when the SetACL.exe process has been started. |
CanConvertTo |
Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions) |
CanConvertToT |
Determines whether the source object can be converted to the specified target type.
(Defined by ObjectExtensions) |
ConvertToT |
Converts an object to the specified target type.
If the conversion fails, an exception is thrown.
(Defined by ObjectExtensions) |
ConvertToT |
Converts an object to the specified target type.
If the conversion fails, returns the specified default value.
(Defined by ObjectExtensions) |
IsDisposable |
Determines whether the specified object is a disposable type
(i.e., it implements IDisposable interface).
(Defined by ObjectExtensions) |
Speak |
Speaks the string representation of the source object by using the
operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions) |
Speak |
Speaks the string representation of the source object by using the
operating system integrated text-to-speech synthesizer.
(Defined by ObjectExtensions) |
ThrowIfNullTException |
Throws the specified exception if the source object is null.
(Defined by ObjectExtensions) |