Single instance of a program, with access to multiple users

0

I want to make my software to run on a certain computer, and if the current user logs out and another logs in, it shouldn't close and the new user would continue the work where the last one left off. It is critical that the application needs to run constantly. And it's also important, that users needs to use the same instance as the last user left off.

Is this possible in Windows 10 (with AD)?

Recon

Posted 2018-09-28T08:36:27.573

Reputation: 1

Please add more details about your application and scenario. Why don't you just have you users RDP to the certain computer with the same credentials and never log out? They can disconnect the session and leave the software running. – simlev – 2018-09-28T08:55:57.370

They need to be different users as they have different permissions to some folders, etc. – Recon – 2018-09-28T09:05:28.193

Answers

2

An application, that doesn't "belong" to a user, but to the system is called a service in NT (so also W10) parlance. While it can't provide a UI directly, it can create an endpoint where a UI-only application plugs in to show a UI.

This is best explained with the Windows Update mechanism or the Windows Defender mechanism: Both have a worker process running as services, i.e. in the Background decoupled from a User being logged in, but their UI is seperate from this worker process and doesn't keep any state - it can be killed without affecting the underlying service. The UI process connects to the worker process to get the state of the service and display it in a nice UI, or to send commands to the service which were entered via the GUI.

If your application does something "fancy" that needs UAC consent, this model also helps you: Services have intrinsic consent (the UAC popup i/a comes when installing it), and the UI part doesn't need it.

Eugen Rieck

Posted 2018-09-28T08:36:27.573

Reputation: 15 128

0

I see two solutions :

  • Save on file the information about the state of the application, so you may restart where stopped,

  • Convert your application to a Windows system service and split it into two parts : System service part and GUI part.

harrymc

Posted 2018-09-28T08:36:27.573

Reputation: 306 093

-1

The process is terminated when the user logs out.

I suggest you to create a new user in AD, and that should be the only user active on that computer, so they don't have to log out.

Rattlehead

Posted 2018-09-28T08:36:27.573

Reputation: 143