Re: wmi win32_desktop object (has something to do with security?)

From: Tim Springston [MS] (tspring_at_online.microsoft.com)
Date: 08/29/04


Date: Sun, 29 Aug 2004 13:12:44 -0500

You may want to post this one specifically to the WMI newsgroup:
microsoft.public.win32.programmer.wmi.

-- 
Tim Springston
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
"hotpot" <hotpot@discussions.microsoft.com> wrote in message 
news:D3F5E1E8-475F-4C4F-A81B-FAE0665773E1@microsoft.com...
> Following codes only shows currently logged in profile/user on WIN 2K with
> SP4 and XP. However, on WIN 2K with SP2 and 3 it shows all the users'
> profile's names. Why is it so?
>
> strComputer = "."
> Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
> Set colItems = objWMIService.ExecQuery("Select * from Win32_Desktop",,48)
> For Each objItem in colItems
>    WScript.echo "Name: " & objItem.Name
> Next
>
> Appreciate if any one can help me.
> 


Relevant Pages