How to access the network from the service

<< Click to Display Table of Contents >>

Navigation:  Several practical recommendations > Running RoboTask as an NT service >

How to access the network from the service

The RoboTask service runs in a separate SYSTEM session. By default, the service does not have access to network resources in your local network. However, it is often necessary to have access to network drives or files on another computer in the local network.

There are two ways to resolve this issue.

 

The first method:

You can run the service with the rights of a registered user. This can be done using RoboTask Service Manager or using the system Service Manager.

The service will automatically obtain the rights of the specified user. If this user has access rights to network resources, then the service will also have access to network resources.

But this method has its disadvantages:

The user must have "Log on as a service" rights. This can be set in the security policy editor (Control Panel -> Administrative Tools (or "Windows Tools" in Windows 11) -> Local Security Policy. Then Local Policies -> User Right Assignment -> Log on as a service).

For users of a domain structure, there is a similar editor for group security policies.

The system service automatically loses SYSTEM rights, which are comparable to administrative rights.

 

The second method:

This method is simpler and more universal. You can log in the SYSTEM session on the desired network resource entirely using the system utility NET.EXE.

The command line is as follows:

 net use \\<ServerName>\<ShareName> <UserPassword> /user:<UserName>

If you are using a local user, then UserName is simply the username on the <ServerName> computer.

If you are using a domain network structure, then you should use a domain user: <DomainName><UserName>

 

You only need to run this command line once. For example, when starting the RoboTask service.

You can run this command line using the actions Run Program/Open Document or Run Console Application.

You can insert this command line into the first line of a batch file BAT or CMD. Running this command again will not cause an error.

 

note Related Topics

Custom variables

Running tasks simultaneously

Task synchronization

Using built-in Basic

Errors processing

Service vs Application

Using UNC names

How to access the network from the service

RoboTask Service manager

How to get an access RoboTask Service