SkillAgentSearch skills...

GhostShell

👻 Streamlining shell extensions in .NET

Install / Use

/learn @MirekVales/GhostShell
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

GhostShell

Divides the extension scope to an infrastructure and implementation part - to a client that is registered as a shell extension and invokes features remotely, and to a server that provides an implementation. The client has no implementation, therefore it may be registered once and stay intact. The server is invoked over WCF and may be changed on the fly without need to re-register the extension.

GhostShell uses SharpShell to register shell extensions.

Example of use

Example of use

var clientPath = @"A PATH TO CLIENT DLL (GhostShell.Client.dll)";
using (var clientRegistration = new Registration(clientPath))
{
      var registration = Association.Create
          .AssociatedToFile("*.*")
          .WithItem(new Controls.Separator(),
          new Controls.MenuItem("Application", SystemIcons.Application.ToBitmap(),
             new Controls.MenuItem("Asterisk", SystemIcons.Asterisk.ToBitmap(), () => MessageBox.Show("*")),
             new Controls.MenuItem("Warning", SystemIcons.Warning.ToBitmap(), () => MessageBox.Show("!")),
             new Controls.MenuItem("Hand", SystemIcons.Hand.ToBitmap())), new Controls.Separator());

      var broker = new Broker();
      broker.RegisterExpression(registration);

      var url = @"net.tcp://localhost:61234/GhostShellBroker";
      using (var host = new ServiceHost(broker, new Uri(url)))
      {
          host.AddServiceEndpoint(typeof(IBroker), new NetTcpBinding(), url);
          host.Open();
          Console.ReadLine();
      }
}

It is necessary to execute the registration in administrator mode.

View on GitHub
GitHub Stars6
CategoryDevelopment
Updated1y ago
Forks1

Languages

C#

Security Score

75/100

Audited on Jul 3, 2024

No findings