Solved

Unable to execute external GUI program from Windows service

Posted on 2008-10-28
1
694 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
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.
The viewer will learn how to create multiple layers to apply various filters and how to delete areas from each layer’s filter.
The viewer will learn how to successfully download and install the SARDU utility on Windows 7, without downloading adware.

862 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now