Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>@CodeCaster is right. WCF services don't expose a UI in and of themselves. Your application, however, is able to run in a batch mode, as you said; and in this mode, it still shows a UI.</p> <p>There may be a way to get a WCF service to start and run this GUI program in batch mode. You would need to create a Windows user account under which the service would run. After you create the WCF service and install the service as a Windows Service, open the Services applet from the Administration Tools. Right click the service and choose <strong>Properties</strong>. Then click the <strong>Log On</strong> tab and specify the username and password of the Windows user account you created for the service. (Of course, Windows Server 2008 R2 and 2012 have new Service Accounts that would also do the trick.)</p> <p>The catch with this scenario is, you have to give the user account you created the <strong>Interact with the desktop</strong> right. This is a bit of a security concern because you may have an Administrator-level account (depending on how you set it up) running autonomously with the right to interact with the desktop.</p> <p>The other problem with this approach is that if the GUI program expects any type of user input (i.e. an error occurs or a dialog is displayed), the service account won't be able to click any buttons or acknowledge anything in anyway. That's why this method is discouraged.</p> <p>If the program is written in .NET and is your company's internal code, you could try taking ILDASM to the program binary or use a tool like ILSpy or Red Gate's .NET Reflector and reverse engineer the program and split it up into constituent parts (assuming the code isn't obfuscated)&mdash;a service DLL that provides the batch processing, and a GUI for when you want to run the program interactively. The service DLL can then be re-used (as @CodeCaster said) to run the logic in a "batch" mode via the WCF service you would create, all the while avoiding the nasty <strong>Interact with the desktop</strong> right required to run the current program's GUI.</p> <p>It's not really a perfect answer (if an answer at all), but I hope it helps.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload