It is my understanding that Windows services now run in a substantially different environment from login sessions, especially on Vista® where they (for instance) no longer have any direct access to the console.
It is therefore entirely possible – would not surprise me in the slightest – if “drive letter mapping” did not exist at all. Services are now intentionally placed “more than an arm's length away from” the world of interactive users and from anything that those users might be able to control or influence. (After all these years, Microsoft finally got the message!)
There are many reasons to prefer UNCs. A UNC-path is self describing, whereas a path that uses a “mapped drive letter” is dependent on something that it neither specifies nor controls: that the drive-letter is not only mapped, but mapped “correctly.” (Whatever that means.)
Finally, pay very careful attention to the user-id under which the service runs. It should be (in my opinion) a dedicated user-id, chosen for the purpose, which does not allow direct logins but which can only be used by a service. Naturally, that user must have the right to have (read-only) access to the appropriate UNC share.
(Again for “hacker prevention” reasons, that service-userid should not have read/write access to that share: what it does not require, it should not have, nor be able (by any means whatsoever) to get.
|