public override RMA.RhiExec.Engine.PackageInstallState GetInstallState(Package package)
        {
            // See what version this package contains.
            PythonPluginInfo ppi = new PythonPluginInfo();

            if (!ppi.Initialize(package))
            {
                throw new PackageNotCompatibleException(package.PackagePath);
            }

            // Is this installed for All Users?
            ReportProgress("Getting InstallState for " + this.PackagePath, LogLevel.Debug);

            // Is plug-in installed for all users?
            ReportProgress("Checking install state for current user", LogLevel.Debug);
            string folder = InstallerEngine.InstallRoot(this.InstallRoot);

            // AllUsersInstallFolder returns ...\plug-in name\version
            // we want to look in just ...\plug-in name
            folder = Path.GetDirectoryName(folder);

            Version InstalledVersion = GetNewestVersionOfInstalledPackage(folder);

            return(CompareVersions(this.PackageVersion, InstalledVersion));
        }
 private void ClearPluginInfo()
 {
     m_info = null;
       m_package = null;
 }
 private void ClearPluginInfo()
 {
     m_info    = null;
     m_package = null;
 }
        public override RMA.RhiExec.Engine.PackageInstallState GetInstallState(Package package)
        {
            // See what version this package contains.
              PythonPluginInfo ppi = new PythonPluginInfo();
              if (!ppi.Initialize(package))
            throw new PackageNotCompatibleException(package.PackagePath);

              // Is this installed for All Users?
              ReportProgress("Getting InstallState for " + this.PackagePath, LogLevel.Debug);

              // Is plug-in installed for all users?
              ReportProgress("Checking install state for current user", LogLevel.Debug);
              string folder = InstallerEngine.InstallRoot(this.InstallRoot);

              // AllUsersInstallFolder returns ...\plug-in name\version
              // we want to look in just ...\plug-in name
              folder = Path.GetDirectoryName(folder);

              Version InstalledVersion = GetNewestVersionOfInstalledPackage(folder);
              return CompareVersions(this.PackageVersion, InstalledVersion);
        }