G
Guest
I am actually trying to get the UNC path of the main module of a process
running from a mapped drive, and I am trying to do this from a service. The
ProcessModule class only provides the full path with the mapped drive letter,
but the drive letter refers to the drive mapping for the user that started
the process, and cannot be resolved to a UNC path from a service running
under LocalSystem.
Presumably, therefore, I need to get the drive mapping either for the user
account associated with the process, or possibly even for the process's
session ID (I am not clear whether mappings are per user or per session). Can
anyone give me a clue as to how I go about this?
running from a mapped drive, and I am trying to do this from a service. The
ProcessModule class only provides the full path with the mapped drive letter,
but the drive letter refers to the drive mapping for the user that started
the process, and cannot be resolved to a UNC path from a service running
under LocalSystem.
Presumably, therefore, I need to get the drive mapping either for the user
account associated with the process, or possibly even for the process's
session ID (I am not clear whether mappings are per user or per session). Can
anyone give me a clue as to how I go about this?