Interact With Desktop Service installation

  • Thread starter Thread starter ThunderMusic
  • Start date Start date
T

ThunderMusic

Hi,
I created a service application. This service, can possibly start other
applications or display message boxes, so it needs to interact with the
desktop. The question is the following : How can I make the "interact with
the desktop" checkbox checked automaticaly when my service is installed? I
looked at the ServiceInstaller and ServiceProcessInstaller classes, but none
give me this option (or maybe I didn't see it).

Thanks

ThunderMusic_80
 
ThunderMusic said:
I created a service application. This service, can possibly start other
applications or display message boxes, so it needs to interact with the
desktop. The question is the following : How can I make the "interact with
the desktop" checkbox checked automaticaly when my service is installed? I
looked at the ServiceInstaller and ServiceProcessInstaller classes, but
none
give me this option (or maybe I didn't see it).

If no one suggests a .Net way of doing this you can check the docs for the
native functions OpenSCManager(), ChangeServiceConfig() and
CloseServiceHandle() and use Platform Invoke services to call them from your
managed code.

Regards,
Will

P.S. You do know that running a service like this opens you up to the
Shattered Windows attack, yes?
 
Back
Top