?
Solved

WMI to get file info

Posted on 2004-11-04
8
Medium Priority
?
278 Views
Last Modified: 2008-01-16
Is There a way to use vbscript and WMI to get file information? specifically I am looking for file version
0
Comment
Question by:JonMny
  • 4
  • 2
6 Comments
 
LVL 48

Expert Comment

by:Mikal613
ID: 12498265
does it have to WMI can it be FSO FileSystemObject

http://www.winnetmag.com/WindowsScripting/Article/ArticleID/7825/7825.html
0
 
LVL 48

Expert Comment

by:Mikal613
ID: 12498276
msgbox fso.GetFileVersion(Path)
0
 
LVL 9

Author Comment

by:JonMny
ID: 12498296
I need to be able to check remote computers
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 9

Accepted Solution

by:
JonMny earned 0 total points
ID: 12499715
I found the Answer



strComputer = "."
Set objWMIService = GetObject _
    ("winmgmts:" & "!\\" & strComputer & "\root\cimv2")
Set colFiles = objWMIService.ExecQuery _
    ("Select * from CIM_DataFile where Name = " _
        & "'c:\\scripts\\toggle_service.vbs'")
For Each objFile in colFiles
msgbox objfile.version
Next

0
 
LVL 48

Expert Comment

by:Mikal613
ID: 12499750
it works?

Congratulations!! ;)
0
 
LVL 48

Expert Comment

by:Mikal613
ID: 12559095
Grant the Wish Oh wise One ;)
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Q&A with Course Creator, Mark Lassoff, on the importance of HTML5 in the career of a modern-day developer.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…
Suggested Courses
Course of the Month14 days, 11 hours left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question