Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


January 17, 2006

Improve Your Home-Brewed Hardware Inventory


RSS
View this exclusive article with VIP access -- click here to join |
See More Products / Hardware Articles Here | Reprints | Or sign up for our VIP Monthly Pass!
Main Article    Rem

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. . . .

Reader Comments

You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

How can I stop and start services from the command line?

...

Where is Microsoft NetMeeting in Windows XP?

...


Related Events SQL Server 2008 – Can You Wait? | Philadelphia

SQL Server 2008 – Can You Wait? | Atlanta

SQL Server 2008 – Can You Wait? | Chicago

Check out our list of Free Email Newsletters!

Scripting eBooks Keeping Your Business Safe from Attack: Encryption and Certificate Services

Best Practices for Managing Linux and UNIX Servers

Building an Effective Reporting System

Related Scripting Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing