![]() ![]() ![]() First, the FileSystemObject is designed for use on the local computer it’s not really designed to work against remote machines. So if that’s easy why don’t we just recommend this script and be done with it? Well, for two reasons. And there isn’t much work involved in calling GetFileVersion, either in fact, all we have to do is specify the file in question – in this case, C:\Windows\System32\Scrrun.dll – and the FileSystemObject will do the rest. We simply create an instance of the FileSystemObject and then echo the value returned by the GetFileVersion method. Wscript.Echo objFSO.GetFileVersion(“c:\windows\system32\scrrun.dll”)Īs you can see, there isn’t much work involved here (one reason why it’s a Scripting Guys favorite). This script uses the FileSystemObject and requires a grand total of 2 lines of code: Set objFSO = CreateObject(“Scripting.FileSystemObject”) Let’s start with the version designed for the local computer. Of course, if you want to send us a check anyway…. But Microsoft won’t let us do that, so you get both scripts for free. Ok, being the kind of guys that we really are, we’d charge you for both solutions. Being the kind of guys that we are, we’ll show you both solutions. There at least two ways we know of to retrieve the version information for a file: one designed for working on the local computer and one that can work either locally or remotely. Hey, Scripting Guy! How can I extract version information for a DLL or other type of file? ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |