I am writing a batch queueing system that is going to offer a facility to
mount network drives for all child processes of the queue manager NT
service.
It looks like WNetAddConnection2() can be used to mount a drive, but MSDN
claims that that DOS device names are not inherited accross logon sessions.

1. Can I use ImpersonateLoggedOnUser() to allow me to do
WNetAddConnection2() in the context of a drop privilege logon session
prior to calling CreateProcessAsUser() to start a child process in my
queue manager? This looks like most promising approach to me.

2. If I mount the drive letter for all users (MSDN suggests that this
will only work with XP/2003 - and only if WNetAddConnection2() is called
as LocalSystem) then call CreateProcessForUser(), will child processes be
able to access the network share? I assume I would need to provide a set
of valid credentials for the remote share if I do this, since SYSTEM
will not be able to connect, and that NT will enforce the current sessions
credentials, not those of the user that original created the drive letter
mapping?

Any advice much appreciated.
Thanks,
km