Hi,
I am using Windows 7. In one of my application (non - administrator mode),
CM_Reenumerate_DevNode(DeviceInfoData.DevInst, 0); returns
CR_ACCESS_DENIED.
I tried with AdjustTokenPrivileges() to enable privileges , but no success.
Regards,
Raghuveer.K
The docs say that this CM_Reenumerate_DevNode() requires SeLoadDriverPrivilege; that has to require admin rights, so I would assume that this is your problem.
Good luck,
mm
thanks,
i tried to enable SeLoadDriverPrivilege using GetTokenInformation() &
AdjustTokenPrivileges(). but no success.
Regards,
Raghuveer.K
On 11/17/09, xxxxx@evitechnology.com wrote:
>
> The docs say that this CM_Reenumerate_DevNode() requires
> SeLoadDriverPrivilege; that has to require admin rights, so I would assume
> that this is your problem.
>
>
> Good luck,
>
> mm
>
> —
> NTFSD is sponsored by OSR
>
> For our schedule of debugging and file system seminars
> (including our new fs mini-filter seminar) visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
Sorry; I missed that you had already tried adjusting the privileges.
-
What happened when you tried? Did AdjustTokenPrivileges() return an error?
-
Are you an Admin equivalent user? I’m just talking about the user account, not about ‘Run As Administrator.’
mm
>>1. What happened when you tried? Did AdjustTokenPrivileges() return an
error?
- it returns an error (ERROR_NOT_ALL_ASSIGNED).
>2. Are you an Admin equivalent user? I’m just talking about the user
account, not about ‘Run As Administrator.’
- yes, my user account belongs to admin group.(standard user)
On 11/17/09, xxxxx@evitechnology.com wrote:
>
> Sorry; I missed that you had already tried adjusting the privileges.
>
> 1. What happened when you tried? Did AdjustTokenPrivileges() return an
> error?
>
> 2. Are you an Admin equivalent user? I’m just talking about the user
> account, not about ‘Run As Administrator.’
>
> mm
>
>
>
> —
> NTFSD is sponsored by OSR
>
> For our schedule of debugging and file system seminars
> (including our new fs mini-filter seminar) visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
I think that means that the token does not have one or more the privilege(s) you’re trying to adjust; they have to be present in order for your to enable/disable them.
This would make sense to me, as I wouldn’t expect a non ‘Run As Admin’ thread to have SeLoadDriverPrivilege.
Is there some reason why you can’t ‘Run As Admin?’
mm
In my case, this is an application(custom video player) which loads/unloads
a codec filter driver.but the device tree should be updated only after
reenumeration.and this application must & should run in any mode(admin or
non-admin). and it may not be possible for every user to know his admin
password.
On 11/17/09, xxxxx@evitechnology.com wrote:
>
> I think that means that the token does not have one or more the
> privilege(s) you’re trying to adjust; they have to be present in order for
> your to enable/disable them.
>
> This would make sense to me, as I wouldn’t expect a non ‘Run As Admin’
> thread to have SeLoadDriverPrivilege.
>
> Is there some reason why you can’t ‘Run As Admin?’
>
>
> mm
>
> —
> NTFSD is sponsored by OSR
>
> For our schedule of debugging and file system seminars
> (including our new fs mini-filter seminar) visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>
Despite the [NTDEV] strangely present in your subject line, you’re having this discussion on the NTFSD list.
As this thread isn’t file system related, would you kindly take further discussion over to NTDEV?
Thanks,
Peter
OSR