Re: VC++ 6.0 dll can not access a network drive
"DBC User" <dbcuser@gmail.com> wrote in message
news:1190916541.644071.258420@g4g2000hsf.googlegroups.com...
Sorry it took some time. After some more research this is what I
found, may be you would able to help me now. Let me restate the
problem. My user is is a member of administartive group. I mapped a
network drive. Now I run my program and it works perfectly fine. It
executes the program in the network and everything is fine.
Now I 'run as' administator on the same program and the program can
not see the network drive. When you run the program as administator I
thought it runs in elevated mode. Is it still true with integrity
level?
For me it looks like when you run as admin, it is running in a
complete profile and in that profile there is no mapped network. Is it
a safe assumption? If so how can we resolve it?
Thanks.,
Thanks.- Hide quoted text -
- Show quoted text -
So to confirm my finding, I logged in as an admin and mapped the same
drive and now when I do 'run as' my program works like a charm.
Thanks.
Running on the Administrator account is *not* the same as doing the "Run As
Administrator" from a different account. The wording implies they are the
same, but they're not. The Admninistrator account (when you "logged in as
Admin") is a user account with a username/password, and it it these
credentials that might give you access to the network drive. But "Run As
Administrator" ("elevates" the process) merely gives the app access to
resources with a High MIC level. Since, AFAIK, network drives aren't
associated with MIC level --- only by the user authentication
(username/password) --- this should not alter the behavior at all.
Only if the non-Admin account has access to the network drive (can you map
it in Explorer, for example?) will you be able to access it from your app,
whether you Run As Administrator or not.
-- David