Re: HOW TO Assign wmi rights to non-administrators!
- From: "Scott McNairy \(MVP\)" <v-scomcn@xxxxxxxxxxxxxxxxxxxx>
- Date: Wed, 18 May 2005 12:52:33 -0700
This problem is consistent with the security settings in Windows. You can
confirm by right clicking "My Computer" selecting "Manage" and expanding
"Storage" and clicking "Disk Management" while logged in as the user you are
using for the code below. You will get "User does not have permissions"
error.
I guess if you want to manage partitions you need to be a higher rights
user.
--
Scott McNairy
Microsoft MVP - Windows Server Management Infrastructure
"Mantzas" <mantzas@xxxxxxxxxxxxxxxx> wrote in message
news:9E3DB014-4984-4390-9087-31D7F90976F3@xxxxxxxxxxxxxxxx
> Thanks for the reply, it was helpfull but i still have another problem!
>
> I can run this query :
> System.Management.ObjectQuery oQuery = new
> System.Management.ObjectQuery("SELECT Caption, DeviceID FROM
> Win32_DiskDrive");
> as simple user, but not the following:
>
> "ASSOCIATORS OF {Win32_DiskDrive.DeviceID=\"\\\\\\\\.\\\\PHYSICALDRIVE0\"}
> WHERE AssocClass = Win32_DiskDriveToDiskPartition" .
> This query runs only with the administrator account, else it returns null.
>
> Thanks
> "Scott McNairy (MVP)" wrote:
>
>> The action should work locally as a regular user account.
>>
>> If you are doing this on a remote computer, you need to:
>> 1. Right click "My Computer"
>> 2. Click "Manage"
>> 3. expand "Services and Applications"
>> 4. Right click "WMI Control"
>> 5. Select "Properties" and assign user right "Enable Account" and
>> "Remote
>> Enable" to the user account you wish.
>>
>> --
>> Scott McNairy
>> Microsoft MVP - Windows Server Management Infrastructure
>>
>>
>> "Mantzas" <mantzas@xxxxxxxxxxxxxxxx> wrote in message
>> news:E56DF236-9160-46AF-BF6C-CB2C7FB9BB92@xxxxxxxxxxxxxxxx
>> > Hi there,
>> >
>> > i am using
>> > ManagementObjectSearcher searcher = new
>> > ManagementObjectSearcher("SELECT *
>> > FROM Win32_DiskDrive");
>> >
>> > to retrieve information from my disk drive.
>> > Unfortunatelly, my application runs only for accounts in the
>> > administrators
>> > group.
>> > Any idea of how to perform this as a simple user????
>> >
>> > Thanks
>>
>>
>>
.
- Follow-Ups:
- Re: HOW TO Assign wmi rights to non-administrators!
- From: Mantzas
- Re: HOW TO Assign wmi rights to non-administrators!
- References:
- HOW TO Assign wmi rights to non-administrators!
- From: Mantzas
- Re: HOW TO Assign wmi rights to non-administrators!
- From: Scott McNairy \(MVP\)
- Re: HOW TO Assign wmi rights to non-administrators!
- From: Mantzas
- HOW TO Assign wmi rights to non-administrators!
- Prev by Date: RE: Question about functionality of the Exchange_DSAccessDC class
- Next by Date: Re: WMI Logoff won't
- Previous by thread: Re: HOW TO Assign wmi rights to non-administrators!
- Next by thread: Re: HOW TO Assign wmi rights to non-administrators!
- Index(es):
Relevant Pages
|