Archived from groups: comp.os.ms-windows.programmer.win32,comp.lang.basic.visual.misc,microsoft.public.windowsnt.misc,comp.os.ms-windows.nt.software.services (More info?)
"Lyle Coder" <firstname.lastname@example.org> wrote in message
> In my program which is launched via a modified msgina (and hence runs
> as SYSTEM), I do the following
> 1. LogonUser
> 2. ImpersonateUser
> 3. CreateProcessAsUser (with the security token obtained via
> For the CreateProcessAsUser, I execute cmd.exe and pass in a batch
> file to run which mounts drives via "net use".
> The drives mount fine, however, the drives are ONLY AVAILABLE to that
> cmd window. Any other process (like explorer or some other cmd shell)
> cannot see those drives
Virtual drives (made by Net use) are stored in Registry under
When your code runs there is no such hive loaded as SYSTEM doesn't have one
API's you specify doesn't load one.
Anyway.. to give permission to network drives to a specific user you a) need
account credentials and b) need to store the account etc in his/her Registry
i can't see the point in your excersise - why not just use a logon script, a
All Users\... Startup or a command line under Run in HKLM ?