User Mode vs Service Mode in UiPath

UiPath can be installed on a computer in two different ways, User Mode or Service Mode. It is useful to understand the difference between the two, and how they work under the hood. To do this, let’s first understand about Services and Sessions.

Services & Sessions

Modern computers don’t load everything all into one space on the hard drive anymore. Now, when a computer boots up, all sorts of programs are loaded in first, and this can take a while. These programs are called Services, and do such things as drive the hardware on the computer, sound, security, Bluetooth, etc. To see a list, search “Services” from your Start command. These Services are loaded into a special space reserved for them called Session 0. The important thing to remember about Session 0 is that it doesn’t hold user-interactive applications, like Excel or Word or Chrome. Services are available for user applications to talk to, but they have no User Interface. They are simply running in the background.

Once all the Services have been loaded, the system asks the user to log in. The user, let’s call him Bob, logs in with his ID and password, and a new Session is created, Session 1. Bob’s profile is loaded in, his preferences and settings, and his files and applications are made available to him. All modern computers work this way now, separating out computer-wide background processes from user-interactive ones.

To understand why there are two ways to install UiPath, let’s look at it from two different perspectives, the user’s and the company’s.

Bottom Up: The Evolution of the Macro

Back in the 80s and 90s, people used Excel all the time to get their work done. Users were drowning in tons of Excel files. Then, macros became a thing to help automate some bits of it. Using macros, workers could “record” some repetitive tasks, like long calculations, data entry, or linking of spreadsheets, and have the computer do it. Gradually macros got more and more sophisticated, and could reach out and automate other applications, exchange data, log into websites, and do all kinds of stuff.

On one level, UiPath can be seen from that “bottom up” angle. Bob needs to automate some repetitive, boring task, and so a “recording” of that task is created, coded in UiPath language, and made available for Bob to launch whenever he needs it.

In this example, UiPath could be installed on Bob’s workstation in User Mode. In this mode of installation, the UiPath Robot Service is installed on Bob’s machine under his profile. Essentially, any time the Robot Service runs an automation, it is already logged into the machine using Bob’s log in, usually in Session 1. Bob can now automate some of his work. Bob is happy.

It is important to note that in User Mode, once Bob logs off his machine or closes his laptop, its installed Robot Service shuts down. If it is connected to Orchestrator as an unattended machine, the signals that the Robot Service on the machine sends to Orchestrator stop. As far as Orchestrator is concerned, the connection is unresponsive, and will error.

Top Down: Maximizing Computer Resources

In a large company, installing every application on a user-by-user basis quickly becomes cumbersome and unwieldy to manage. Company workstations aren’t as wedded to one employee anymore, but rather have become a shared resource used by many employees, who might log into any workstation available, and still work on their own files. So, to enable the Robot Service to work for any logged in user on the machine, the Enterprise way of installation is called Service Mode.

In this setup, not only can any user log into the machine and use the Robot Service, SO CAN A ROBOT ACCOUNT. The whole purpose here is to make use of all available computing power, day and night. A company can run automations using any workstation that is connected and available. So, the workstations remain powered up all the time, and connected to Orchestrator. When Orchestrator needs to run a job, it finds an available, non-busy machine, sends down the automation to the Robot Service installed on its Session 0, which, using log in credentials stored in Orchestrator, spins up a temporary, dedicated Session to run the automation (Session 1 or whatever’s next), runs the automation, closes the Session, and then reports back to Orchestrator.

Conclusion

We now have a very basic understanding of the two ways UiPath can be installed on a workstation, Service Mode and User Mode. We know that Service Mode is intended primarily for companies, while User Mode is a more straightforward set up. The main advantage of Service Mode is that it allows a robot user account to log in to the workstation and spin up a dedicated Session to run in. Keep in mind that both attended and unattended automations can run in either type of installation.

Next: Understanding Structure of Orchestrator