Map a network drive to be used by a service

前端 未结 12 2167
再見小時候
再見小時候 2020-11-22 10:43

Suppose some Windows service uses code that wants mapped network drives and no UNC paths. How can I make the drive mapping available to the service\'s session when the servi

12条回答
  •  耶瑟儿~
    2020-11-22 11:29

    You wan't to either change the user that the Service runs under from "System" or find a sneaky way to run your mapping as System.

    The funny thing is that this is possible by using the "at" command, simply schedule your drive mapping one minute into the future and it will be run under the System account making the drive visible to your service.

提交回复
热议问题