Re: Other version information



I should add a note to that long, previous post,
in case you're not familiar with classes: The VBS
class is complex, but you can just paste it at the
bottom of a script and create it as an object. You
don't have to incorporate the code. The class is
probably the most dependable way to get version info.,
among the methods I listed. (With the one limitation
that it won't work on systems with a default DBCS (double
byte character set) language, such as Chinese, Japanese
and Korean, due to limitations in the way that Textstream
works.

If you look at the ProcessRes function in the class
you'll see that's where the returned data is set up.
You can edit those lines that call GetInfo to
customize what specific version info. you want
returned, without needing to necessarily figure out
and rewrite the whole class.

Alternatively, you could make the GetVersionInfo
function a boolean return that tells you whether
version info. was successfully retrieved. You'd
then "initialize" the data by calling something like:

Boo1 = ClsProps.GetVersionInfo("C:\File.exe")

You'd calso hange the ProcessRes parameter of
"sDat" to a variable that's global within the class,
and make GetInfo a public function.
Once those changes were made you could just
call GetVersionInfo and, assuming you got a True
return you could call the class for each property:

s = ClsProps.GetInfo("ProductName")




.


Loading