VC操做注册表,我想知道机器中Office的版本,安装路径等信息,看哪个健值?谢谢!

解决方案 »

  1.   

    http://support.microsoft.com/default.aspx?scid=kb;en-us;Q234788
    HOWTO: Find the Installation Path of an Office 2000 or an Office XP ApplicationMsiGetFileVersion
    The MsiGetFileVersion returns the version string and language string in the format that the installer expects to find them in the database. If you just want version information, set lpLangBuf and pcchLangBuf to zero. If you just want language information, set lpVersionBuf and pcchVersionBuf to zero.UINT MsiGetFileVersion(
      LPCTSTR szFilePath,      // path to the file
      LPTSTR lpVersionBuf,     // returned version string
      DWORD *pcchVersionBuf,   // buffer byte count
      LPTSTR lpLangBuf,        // returned language string
      DWORD *pcchLangBuf       // buffer byte count
    );