Re: HOW TO Assign wmi rights to non-administrators!



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
>>
>>
>>


.



Relevant Pages

  • Re: Admnistrator, Administrators & Admin rights question?
    ... I want to setup this particular system for a user and restrict some of the ... Having the Administrator account 'hidden' from the user at the normal login ... prompt is ideal - that way only the normal user account will show up. ... Having just installed a new XP Pro install on a notebook I have a question ...
    (microsoft.public.windowsxp.general)
  • Re: User Account Suddenly Unaccessable
    ... From the 300+ pages of stuff I read, it appears that the information about my preferences, icons, styles, settings, etc. are still stored on the computer. ... Assuming you agree with the above, the problem then seems to be getting my user account (cwlee) to ... Can you think of a way to "transfer" those "tastes" either to the Administrator account, or to a newly created user account with a new name? ...
    (microsoft.public.win2000.general)
  • Re: Stolen Notebook and Password Security
    ... > had some brains to implement a BIOS password after he ... > disabled the ability to boot from CD & Floppy. ... >>user account, both of which have a password. ...
    (microsoft.public.win2000.security)
  • Re: how to setup login and account creation?
    ... You cannot use the popup to query anything. ... You can use ASP to manage permissions and to call system libraries to ... > if i can creat user account or groups, the way is been created right on ... > windows server, through browser.. ...
    (microsoft.public.inetserver.iis)
  • Re: LDAP
    ... special account at all as you don't have to query anything. ... > setup the connection between my AIX server and AD. ... I know I need to setup a user account to ...
    (microsoft.public.windows.server.active_directory)