I enjoyed your article "Home-Brewed Hardware Inventory" (July 2003, Instant-Doc ID 39111). The collection process is fabulous! However, whenever I try to run the report agent (BuildReport.vbs), I get the following error message: (36, 5) Microsoft VBScript runtime error. File not found. I looked at the script, and the line that the error message refers to is
Set objTextFile = objFSO.OpenTextFile
(strInvFilePath & strFileName,ForReading)
I don't see what's wrong with this line. Can you help me?
"Home-Brewed Hardware Inventory" provides a solution for creating a Windows computer hardware inventory by using VBScript and Windows Management Instrumentation (WMI). The answer to this reader's question is useful for adding fault tolerance to any script.
The reader explained that he was using a valid directory path to initialize the script's strInvFilePath variable, which points the report agent to inventory files for processing. However, the script was failing as if the path was invalid. We determined that the problem was a missing backslash (\) at the end of the value that he was specifying. After the reader added the trailing backslash, BuildReport.vbs functioned properly. . . .

