How would I query user's desktop folders using WMI? I've tried using
%username% in the profile path but that doesn't seem to work. I know
WMI uses '%' as a wildcard. Help please.

Re: how to query user's desktop by VS

VS
Tue Aug 15 18:04:38 CDT 2006

inurmix wrote:
> How would I query user's desktop folders using WMI? I've tried using
> %username% in the profile path but that doesn't seem to work. I know
> WMI uses '%' as a wildcard. Help please.

Why do you need WMI ??

Set objShell = CreateObject("WScript.Shell")
Set Fso = CreateObject("Scripting.FileSystemObject")

' **** Users DeskTop Location ****
DesktopPath = objShell.SpecialFolders("DeskTop")
Set oBaseFolder = fso.GetFolder(DesktopPath)

--
VS

Re: how to query user's desktop by inurmix

inurmix
Wed Aug 16 16:09:28 CDT 2006

I want to remotely query desktops thats why I want to use WMI. You cant
do that with FSO
VS wrote:
> inurmix wrote:
> > How would I query user's desktop folders using WMI? I've tried using
> > %username% in the profile path but that doesn't seem to work. I know
> > WMI uses '%' as a wildcard. Help please.
>
> Why do you need WMI ??
>
> Set objShell = CreateObject("WScript.Shell")
> Set Fso = CreateObject("Scripting.FileSystemObject")
>
> ' **** Users DeskTop Location ****
> DesktopPath = objShell.SpecialFolders("DeskTop")
> Set oBaseFolder = fso.GetFolder(DesktopPath)
>
> --
> VS