Tim Springston [MS]
08-29-2004, 07:12 PM
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.
>
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.
>