The program cannot access a network file or directory
Posted: 25 Nov 2021, 18:35
The easy way to solve this is:
Install the program as an APPLICATION, not as a service. Problem solved.
The more advanced way:
Now, if you want to run the program as a service then, if you can read (and care to read, which you should do), then you may have seen the warning that was shown when you installed the program: If you install the program under the local system account, then you won't have access to any network resources. That's a security limitation of Windows. So, you need to chose another "normal" account to run your service.
You can also use impersonation to run your task. This is not a perfect solution, but could work well many times.
Install the program as an APPLICATION, not as a service. Problem solved.
The more advanced way:
Now, if you want to run the program as a service then, if you can read (and care to read, which you should do), then you may have seen the warning that was shown when you installed the program: If you install the program under the local system account, then you won't have access to any network resources. That's a security limitation of Windows. So, you need to chose another "normal" account to run your service.
You can also use impersonation to run your task. This is not a perfect solution, but could work well many times.