I'm putting a script together to query the flash install directory and log any ocx file and its file type.
When I execute it I get an error:
flash.vbs(12, 1) (null): 0x80041017
Any help is appreciated.
Const ForAppending = 8
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objLogFile = objFSO.OpenTextFile("c:\Temp\Flash.csv", _
ForAppending, True)
Set WshShell = CreateObject("Wscript.Shell")
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colFiles = objWMIService.ExecQuery _
("SELECT * FROM CIM_Datafile where extension = 'ocx' and path = 'C:\Windows\System32\Macromed\Flash'")
For Each objFile in colFiles
objLogFile.Write objFile.FileName & ","
objLogFile.Write objFile.Version & "," & vbCrLf
Next
When I execute it I get an error:
flash.vbs(12, 1) (null): 0x80041017
Any help is appreciated.
Const ForAppending = 8
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objLogFile = objFSO.OpenTextFile("c:\Temp\Flash.csv", _
ForAppending, True)
Set WshShell = CreateObject("Wscript.Shell")
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colFiles = objWMIService.ExecQuery _
("SELECT * FROM CIM_Datafile where extension = 'ocx' and path = 'C:\Windows\System32\Macromed\Flash'")
For Each objFile in colFiles
objLogFile.Write objFile.FileName & ","
objLogFile.Write objFile.Version & "," & vbCrLf
Next