![]() You can use code similar to below to compare the versions for, say Word 2010 SP1: Version version = new Version(fileVersion) This is where I abandoned my efforts for the reasons listed in the question - you'll find the version numbers just don't match up. Theoretically, you could now compare this version number to the tables from the KB articles to find the correct service pack. ![]() Path.Combine(installRoot, "WINWORD.EXE")) įileVersion = fileVersionInfo.FileVersion Using Word as an example: FileVersionInfo fileVersionInfo = FileVersionInfo.GetVersionInfo( With this information, you can get the FileVersionInfo for the selected application. Outlook: OUTLOOK.EXE (use OUTLIB.DLL for 2003).Then append the name of the executable (with on exception for Office 2003): ![]() InstallRoot = registryKey.GetValue("Path").ToString() RegistryKeyPath.Insert("SOFTWARE".Length, "\\Wow6432Node")) Unfortunately, it isn't.įind the install root for Office: // version is one of these three: Office 2003 = 11, Office 2007 = 12, Office 2010 = 14 Method 2 in these articles suggest the properties of the executable file is a reliable way to get the actual file version. However, I thought I'd post what I got in case anyone needs to take it farther.įirst, here are the three relevant KB articles which list out the service pack versions: We decided to back out of this because it was taking way too much time.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |