Search for files

R

Rully

Why do I get Remote Procedure Call failed on this one?

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}\\" & strComputer & "\root\cimv2")

Set colFiles = objWMIService.ExecQuery _
("Select * from CIM_DataFile where FileName Like '%~%'")

For Each objFile in colFiles
Wscript.Echo objFile.Name
Next

Thank you.
 
P

Peter Falz

Hi Rully,

Rully said:
Why do I get Remote Procedure Call failed on this one?

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}\\" & strComputer & "\root\cimv2")

Set colFiles = objWMIService.ExecQuery _
("Select * from CIM_DataFile where FileName Like '%~%'")

For Each objFile in colFiles
Wscript.Echo objFile.Name
Next

where do you get the "Remote Procedure Call failed"-error?

Take a look at:
http://groups.google.de/groups?q="[email protected]&rnum=3

HTH

Bye
Peter
 
R

Rully

Line: 8
Char: 1
Error: The remote procedure call failed.
Code: 800706BE
Source: (null)

Hope this helps, thank you.
 
P

Peter Falz

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top