Forum Discussion
1 Reply
- mes6073Contributor
Think about what you are asking and you will find that you have more or less answered your own question. Simply put, the the product name is really dependent on the values for the version numbers of the executables for Access, Excel, PowerPoint, Word, etc.
That siad, according to theMS article Application Registration, you should be able to find the application executable under the key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\App PathsProblem is at this point we are unsure of the what the MS Office executable is, so a quick search of the registry for 'office 2010' and one of the results pointed me to ois.exe (C:\PROGRA~2\MICROS~2\Office14\OIS.EXE) but as you can see in the screen shot below, the only thing that identifies this as Office 2010 is the 'Product Name' and 'Description' attributes of the file:
To iterate extended file attributes, use Shell.Applicaiton to bind to the files parent folder, then the file to get a list of the extended file attributes:
GetFileDetails "C:\Program Files (x86)\Microsoft Office\Office14", "OIS.EXE" Sub GetFileDetails(sFilePath, sFileName) Dim shell : Set shell = CreateObject("Shell.Application") Dim arrHeaders(34), fileInfo, folder, folderItem, i Set folder = shell.Namespace(sFilePath) Set folderItem = folder.ParseName(sFileName) If (Not folder Is Nothing) Then For i = 0 To 34 arrHeaders(i) = folder.GetDetailsOf(folder.Items, i) Next Set folderItem = folder.ParseName(sFileName) If (Not folderItem Is Nothing) then For i = 0 To 34 fileInfo = folder.GetDetailsOf(folderItem, i) If aqString.GetLength(fileInfo) > 0 Then Log.Message arrHeaders(i) & ":" fileInfo End If Next End If Set folderItem = Nothing End If Set shell = Nothing End Sub