Regapp Question

(imported topic written by jcsUTSW)

When you do the following

q: regapps

you get something that looks like this… (just giving you one example, not the whole list)

A: “BESConsole.exe” “8.0.584.0” “BigFix Enterprise Console” “8.0.584.0” “BigFix, Inc.”

What is the identifier for the “Display Name” ?

For example I would like to return a list that has “BigFix Enterprise Console” and not “BESConsole.exe”

I can’t find anything to tell me what it’s called.

Hopefully my question makes sense.

Thanks in advance

(imported comment written by jcsUTSW)

Actually if it’s not asking too much could someone break down the names for each section? I may need to get the company name down the road for something different…

(imported comment written by jeremylam)

The regapp inspector simply returns a file object, so any properties of a file object will work identically.

From the Inspector help library:

The format of the string returned when casting a file using ‘as string’ is:
"" “” “” “” ""
Where:
The name of the file
The ‘Product Version’ of the file.
The value ‘FileDescription’ of version block 1 of the file.
The value ‘FileVersion’ of version block 1 of the file.
The value ‘CompanyName’ of version block 1 of the file.

q: value “FileDescription” of version block 1 of regapp “besconsole.exe”

A: BigFix Enterprise Console

(imported comment written by Lee Wei)

One additional note is that for a file in DOS/Windows, the creator can add or omit the Version Block file, and any of the properties.

This is why when we right-click on a property of a file, sometimes a lot of info is not available.

Because of that, you need to do proper error checking to extract the info.

Here is an example:

(
    name of it, 
    (if (exists product version of it) then (product version of it as string) else ("")), 
    (if (exists version block 1 of it and exists value "FileDescription" of version block 1 of it) 
            then (value "FileDescription" of version block 1 of it) else ("")),
    (if (exists version block 1 of it and exists value "FileVersion" of version block 1 of it) 
            then (value "FileVersion" of version block 1 of it) else ("")),
    (if (exists version block 1 of it and exists value "CompanyName" of version block 1 of it) 
            then (value "CompanyName" of version block 1 of it) else (""))
) 
    of regapps

Lee Wei