Solved

Unable to execute external GUI program from Windows service

Posted on 2008-10-28
1
723 Views
Last Modified: 2009-07-29
Hi,
I have a Java server application that should run on a remote computer and receive control messages from a client. When the message is received, server should execute an external command like opening a notepad. In general the application is used for testing and all GUI operations will be done through the Autoit3 application.
I have converted my server application into a windows service using Java Service Wrapper by http://wrapper.tanukisoftware.org.
After running successfully the service I can communicate with it from the remote client, the commands are being executed but all GUI related operations (like opening notepad) are not happening. When I am running this on a local machine everything works fine. The machine that runs the server is logged using user that has administrator rights. For the windows service I have set the "allow service to interact with desktop" option, so this is not the problem here.

--
Thanks in advance for the help
0
Comment
Question by:aquasw
1 Comment
 
LVL 3

Accepted Solution

by:
caylt earned 500 total points
ID: 22987263
Hello,

By default, services use a noninteractive window station and cannot interact with the user. However, an interactive service can display a user interface and receive user input.

These need to be set up slightly differently:

Interactive Services: http://msdn.microsoft.com/en-us/library/ms683502(VS.85).aspx

Note that Microsoft warns against running Interactive Services in an elevated security context, such as the LocalSystem account.
0

Featured Post

Forrester Webinar: xMatters Delivers 261% ROI

Guest speaker Dean Davison, Forrester Principal Consultant, explains how a Fortune 500 communication company using xMatters found these results: Achieved a 261% ROI, Experienced $753,280 in net present value benefits over 3 years and Reduced MTTR by 91% for tier 1 incidents.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

If your app took Google’s lash recently, here are the 5 most likely reasons.
All of the resources available today make learning a new digital media easier than ever-- if you know where to begin. This is a clear, simple guide to a few of the basic digital art mediums and how to begin learning them on your own.
Using Adobe Premiere Pro, the viewer will learn how to set up a sequence with proper settings, importing pictures, rendering, and exporting the finished product.
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…

730 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question