title: How to know if windows update is waitng for installation
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/121585/best-way-of-detecting-if-windows-has-windows-updates-ready-to-download-install">Best way of detecting if Windows has Windows Updates ready to download/install?</a>  </p>
  </blockquote>
  
  
  
  <p>I am using C# .net 3.5.</p>
  
  <p>How can I know if there are updates ready to be installed in Windows Update?</p>
  
  <p>On windows 8, when Windows Update is waiting to install updates, the sleep option is disabled. </p>
  
  <p>Instead of the regular 3 options: <strong>1.</strong> Sleep <strong>2.</strong> Restart <strong>3.</strong> Shutdown, there are only 2 options: <strong>1.</strong> Restart and update <strong>2.</strong> Shutdown and update. I need to identify this state and notify the user that the machine cannot move to sleep mode becuase updates are waiting to be installed.</p>
  
  <p>Can I do it using WUAPILib?</p>
  
  <p>Thanks</p>