Re: WM_DEVICECHANGE and Windows Vista

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Ah, that could be the problem. I'm logged into the computer as a user that's
part of the Domain Administrators group and am mapping the network drive
using the same user account. So if I select "Run as administrator", is the
application running in the context of the local Administrator account? Is
there a way to get notified of WM_DEVICECHANGE messages for network drives
regardless of user context?

"Scot T Brennecke" wrote:

hdang wrote:
I've got an application that uses WM_DEVICECHANGE (via CWnd::OnDeviceChange)
to detect when logical volumes are added to/removed from a system. I've
noticed a peculiar behavior when running the application under Windows Vista.
If I run the application with standard user rights, the application catches
the WM_DEVICECHANGE message and is able to detect when logical volumes (both
local and network) are added to/removed from the system as expected.
However, when running the application as an Administrator (i.e., right-click
the application and select "Run as administrator"), the application only
catches the WM_DEVICECHANGE message when a local logical volume is
added/removed. It is not able to detect when network logical volumes are
added/removed (i.e., if the application is running and I map a network drive,
the application does not detect that the network drive has just been mapped).
Has anyone run into this problem before?

Are you mapping the network drive as the Administrator user, or as a standard user? If the application is not running in the same
user context, it will most likely not be notified.

.



Relevant Pages

  • 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 ... 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
    ... 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: WM_DEVICECHANGE and Windows Vista
    ... part of the Domain Administrators group and am mapping the network drive ... using the same user account. ... So if I select "Run as administrator", ... there a way to get notified of WM_DEVICECHANGE messages for network drives ...
    (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: VC++ 6.0 dll can not access a network drive
    ... I believe that the use of the runas verb is possibly different than what you have ... Running on the Administrator account is *not* the same as doing the "Run As ... Since, AFAIK, network drives aren't ...
    (microsoft.public.vc.mfc)