Java swing app as a service

Having trouble running Advanced Installer? Got a bug to report? Post it all here.
Post Reply
svkirans
Posts: 9
Joined: Sat Jan 25, 2020 7:48 am

Java swing app as a service

Post by svkirans » Sat Jan 25, 2020 7:57 am

I have a swing app that should launch on the windows startup. It will normally be minimized on the tray and will show some swing UI only when it requires some user authentication like entering user credentials etc.

I am able to create an installer by selecting the app type and console and it is working fine. However, when I try the same by selecting the app type as a service, it is installing as a service, and also starting, but the app is not working. While building the service, I did select Allow interaction with the desktop' option also.

Any ideas on how to do this?

Catalin
Posts: 3380
Joined: Wed Jun 13, 2018 7:49 am

Re: Java swing app as a service

Post by Catalin » Mon Jan 27, 2020 11:58 am

Hello and welcome to Advanced Installer forums,

In our "Service Properties" article, it states that:
Allow the service to interact with desktop - The service is allowed to interact with the user by showing an UI. This option shouldn't be used for services that are installed on Windows Vista, because these services' version lack the ability to interact with the user.
Unfortunately, our article is outdated and probably that is what created the misunderstanding. Please accept my apologies for that. The bolded part should look like:

This option shouldn't be used for services that are installed on Windows Vista or later

I have already created a task for our Technical Writing team to update the article.

In Windows XP, Windows Server 2003, and earlier versions of the Windows operating system, all services run in the same session as the first user who logs on to the console. This session is called Session 0. Running services and user applications together in Session 0 poses a security risk because services run at elevated privilege and therefore are targets for malicious agents who are looking for a means to elevate their own privilege level.
The Microsoft Windows Vista operating system mitigates this security risk by isolating services in Session 0 and making Session 0 non-interactive. In Windows Vista, only system processes and services run in Session 0. The user logs on to Session 1.

More information about this can be found in the following article:

Application Compatibility - Session 0 Isolation

Hope this explanation helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Post Reply