title: Automatically update Windows fully
body: <p>I'm working on a project where the goal is to be able to update a windows computer 100%. That means a program or a script that updates windows automatically with no user interaction at all. Ideally a standalone script that can be run from another script.</p>
  
  <p>The reason: I need to update a lot of computers in my line of work. They can be at any patch level and everything from Windows XP to Windows 8. My goal is to start a script, wait/do something else and then find a fully patched computer.</p>
  
  <p>I've solved a lot by finding ZTIWindowsUpdate.wsf in the <a href="http://technet.microsoft.com/en-us/solutionaccelerators/dd407791.aspx">MDT</a> <a href="http://technet.microsoft.com/en-us/library/bb693631.aspx">Task Sequence</a>. </p>
  
  <p>This can be used like this from an admin cmd:</p>
  
  <pre><code>cssript.exe ZTIWindowsUpdate.wsf
  </code></pre>
  
  <p>My problem so far is that the computer requires a reboot between some of the updates. Probably because of dependencies. ZTIWindowsUpdate.wsf needs to be run as administrator and i can't seem to find a solution to start it as administrator at reboot. Additionally if I get the script to run on startup, how do I stop it, and how do I know when its <em>time</em> to stop it?</p>
  
  <p>Can someone help med with a foolproof solution to this problem?</p>
  
  <p>Thanks!</p>