Ignore:
Timestamp:
11/14/2009 6:27:27 AM (2 years ago)
Author:
lowjoel
Message:

Allow users to control an elevated instance of Eraser from the Explorer context menu.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser6/Eraser/Program.cs

    r1304 r1317  
    3434using System.Diagnostics; 
    3535using System.ComponentModel; 
     36using System.Security.Principal; 
     37using System.Security.AccessControl; 
    3638 
    3739using Eraser.Manager; 
     
    418420            while (pipeServer.ThreadState != System.Threading.ThreadState.AbortRequested) 
    419421            { 
     422                PipeSecurity security = new PipeSecurity(); 
     423                security.AddAccessRule(new PipeAccessRule( 
     424                    WindowsIdentity.GetCurrent().User, 
     425                    PipeAccessRights.FullControl, AccessControlType.Allow)); 
    420426                using (NamedPipeServerStream server = new NamedPipeServerStream(instanceID, 
    421                     PipeDirection.In, 1, PipeTransmissionMode.Message, PipeOptions.Asynchronous)) 
     427                    PipeDirection.In, 1, PipeTransmissionMode.Message, PipeOptions.Asynchronous, 
     428                    128, 128, security)) 
    422429                { 
    423430                    ServerAsyncInfo async = new ServerAsyncInfo(); 
Note: See TracChangeset for help on using the changeset viewer.