Re: VC++ 6.0 dll can not access a network drive



On Sep 27, 4:07 pm, "David Ching" <d...@xxxxxxxxxxxxxxxxxxxxxx> wrote:
"DBC User" <dbcu...@xxxxxxxxx> wrote in message

news:1190916541.644071.258420@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx



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

David,

Now that I read the last part of your question 'correctly', Yes, when
I run the program without 'runas', it is seeing the mapped drive. But
when I run it as 'runas', it is not seeing the network drive at all.
Also I conveniently missed some of the more detail of the process.
Here it goes, hopefully this will clear some of the questions you
might have. I have a program A which has a manifest to run it as
"highestAvailable". This program at the end launches program B with
ShellExecuteEx with 'runas' verb. Also one more thing in this puzzle
is, A is in local drive c:\program and program B is in mapped network
drive. When the program B runs as 'runas', when program B it try to
access the network drive, it gets 'Directory/File not found'. So the
problem is not with Program A, it is the called program B, which can
not see the network drive.

Hopefully I answered your question properly.
Thanks.

.



Relevant Pages

  • Re: I hate disgruntled employees!
    ... since I dont have admin access then I can which means Email, ... network drives are out of the question and the IT guy is ... You can try logging on with the built-in Administrator account ... Here's how to logon as Administrator in XP Pro. ...
    (microsoft.public.windowsxp.security_admin)
  • Re: VC++ 6.0 dll can not access a network drive
    ... Administrator" from a different account. ... Since, AFAIK, network drives aren't ... I run the program without 'runas', it is seeing the mapped drive. ...
    (microsoft.public.vc.mfc)
  • Re: VC++ 6.0 dll can not access a network drive
    ... Running on the Administrator account is *not* the same as doing the "Run As ... resources with a High MIC level. ... Since, AFAIK, network drives aren't ...
    (microsoft.public.vc.mfc)
  • Re: Need help with CWBRXD/RUNRMTCMD (restart)
    ... Windows user or an AS/400 user? ... is it an administrator or superuser? ... > commands to recognize the network drives. ... > required privilege is not held by the client" ...
    (comp.sys.ibm.as400.misc)
  • Re: WM_DEVICECHANGE and Windows Vista
    ... So if I select "Run as administrator", ... there a way to get notified of WM_DEVICECHANGE messages for network drives ... Are you mapping the network drive as the Administrator user, ... user context, it will most likely not be notified. ...
    (microsoft.public.vc.mfc)