Hello,
I have a VBS script that works very well on several posts, however on a few posts, I receive an error message: "This class does not support Automation" -Code : 800A01AE
This script performs a file search. Here is the part in error:
'''''''''''''''''''''''''''''''''''''
'Finding the names.nsf file on Drive D'
''''''''''''''''''''''''''''''''''''''
Sub Recherche
dim objFile
chemin = ""
strComputer = "."
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colFiles = objWMIService.ExecQuery("Select * from CIM_DataFile where drive ='d:' and FileName = 'names'and Extension = 'nsf'")
For Each objFile in colFiles
chemin = objFile.Name
Next
the error is noted on the "For Each objfile in colFiles.
Someone has an idea?
Thank you