Network Drives and Window’s Services

The other day I was working with a program that runs as a windows service on a client’s server. One of the files that the program needs to access is on a mapped network drive. I had tested the program while I was logged in as administrator and everything worked fine, but when it run on its schedule it kept failing. It took me a little while to realize it was because when it ran as the windows service user there was not mapped drive. To solve this problem I had to switch the references to the file to UNC format. The format looks like: \serversharefile_path

Leave a Reply

Your email address will not be published.