Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

VBS Error - Automation - error code : 800A01AE

$
0
0

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


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>