예제 #1
0
 bool xenwinsvc.IRefresh.NeedsRefresh()
 {
     while (!initialised)
     {
         System.Threading.Monitor.Wait(pvinstalllock);
     }
     if (needsinstalling)
     {
         return(true);
     }
     if (pvinstalledStatus != FeatureLicensed.IsLicensed())
     {
         // For license status not match the PVAddon registe status, we need to refresh the status of PVAddon
         return(true);
     }
     return(false);
 }
예제 #2
0
        override protected void onFeature()
        {
            if (!FeatureLicensed.IsLicensed())
            {
                return;
            }

            ProcessStartInfo startInfo = new ProcessStartInfo();

            startInfo.FileName               = "ManagementAgentUpdater.exe";
            startInfo.CreateNoWindow         = true;
            startInfo.UseShellExecute        = false;
            startInfo.RedirectStandardError  = true;
            startInfo.RedirectStandardOutput = true;

            isUpdating = true;
            Process newprocess = Process.Start(startInfo);
        }
예제 #3
0
 bool xenwinsvc.IRefresh.Refresh(bool force)
 {
     lock (pvinstalllock)
     {
         while (!initialised)
         {
             System.Threading.Monitor.Wait(pvinstalllock);
         }
         if (force)
         {
             Feature.Advertise(wmisession);
         }
         if ((!installing()) && (needsinstalling || (FeatureLicensed.IsLicensed() != pvinstalledStatus)))
         {
             RefreshXenstore();
             return(true);
         }
         return(false);
     }
 }
예제 #4
0
 public void RegisterPVAddons()
 {
     registered = FeatureLicensed.IsLicensed();
     try
     {
         if (!installing())
         {
             pvmajor.value = ((int)Registry.GetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Citrix\\XenTools", "MajorVersion", 0)).ToString();
             pvminor.value = ((int)Registry.GetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Citrix\\XenTools", "MinorVersion", 0)).ToString();
             pvmicro.value = ((int)Registry.GetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Citrix\\XenTools", "MicroVersion", 0)).ToString();
             pvbuild.value = ((int)Registry.GetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Citrix\\XenTools", "BuildVersion", 0)).ToString();
             WmiBase.Singleton.Kick();
         }
     }
     catch (Exception e)
     {
         wmisession.Log("Setting system version values failed: \n" + e.ToString());
         throw;
     }
     addSystemInfoToStore();
     addXDInfoToStore();
     WmiBase.Singleton.Kick();
 }