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.
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:
Code: Select all
net use \\<ServerName>\<ShareName> <UserPassword> /user:<UserName>
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.
To get more command line options use commands
Code: Select all
net /?
net use /?
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.
Read more about service mode here >>