{"id":872,"date":"2011-01-19T12:54:23","date_gmt":"2011-01-19T12:54:23","guid":{"rendered":"http:\/\/andyparkes.co.uk\/blog\/index.php\/2011\/01\/19\/sbs-2008-windows-update-and-bits\/"},"modified":"2011-01-19T12:54:23","modified_gmt":"2011-01-19T12:54:23","slug":"sbs-2008-windows-update-and-bits","status":"publish","type":"post","link":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2011\/01\/19\/sbs-2008-windows-update-and-bits\/","title":{"rendered":"SBS 2008, Windows Update and BITS"},"content":{"rendered":"<p>Just following on from my <a href=\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2011\/01\/13\/sbs-2008-setup-hang-while-expanding-and-installing-files\/\">last post about SBS 2008 setup hanging<\/a> while expanding and installing files.<\/p>\n<p>I mentioned in the last post that since it appeared to be Windows Update causing the problem I was hoping the update got stuck would be downloaded again when I manually ran the updates. <\/p>\n<p>So I started the update process and got exactly the same thing. <\/p>\n<p>The progress bar sat doing nothing for ages, simply telling me it was \u201cdownloading updates\u201d.<\/p>\n<p>I mentioned in the last post that I\u2019d forgot to the use the \/ALLUSERS switch with BITSADMIN so I may have missed queued jobs. Turns out i was right. This time there was a number of jobs listed and as they were getting downloaded they started to drop off the list until I was left with job three or four jobs.<\/p>\n<p>The byte count on these jobs didn\u2019t appear to be changing so it looked like the jobs were stuck so my first port of call was to restart the BITS service. <\/p>\n<p>This seemed to have some effect as the byte counts started to go up again.<\/p>\n<p>However, even when the downloaded byte count matched the file size byte count the jobs were still displayed.<\/p>\n<p>Each jobs status was set to <strong><em>\u201ctransferred \u201c<\/em><\/strong> but didn\u2019t look like it was going anywhere.<\/p>\n<p>I found this helpful post on the <a href=\"http:\/\/msdn.microsoft.com\/en-us\/library\/aa363132(v=vs.85).aspx\">lifecycle of a BITS job<\/a> which says<\/p>\n<blockquote>\n<p>The job moves between the queued, connecting, and transferring states until BITS transfers all files in the job. At that point, the job moves to the transferred state. BITS uses round-robin scheduling to schedule jobs that are at the same priority level. Each job is given a slice of time to process its files. If the job does not complete during its time slice, the job goes back to the queued state and the next job in the queue is activated. This prevents large jobs from blocking smaller jobs. Jobs are processed largely on a first in, first out (FIFO) basis; however, BITS cannot guarantee FIFO processing because of round-robin scheduling, job errors, and service restarts. <\/p>\n<\/blockquote>\n<p>So for some reason the job wasn\u2019t reaching the <strong><em>\u201ccomplete\u201d <\/em><\/strong>stage.<\/p>\n<p>I initially didn\u2019t think this would be a problem as BITSADMIN has the \/COMPLETE flag but when I ran it I was given an access denied error. <\/p>\n<p>The penny dropped then and I realised why I hadn\u2019t seen the jobs until I used the \/ALLUSERS flag. The job owner was set to the system account so even though I was logged in as the administrator I couldn\u2019t make changes to the job.<\/p>\n<p>Once again I thought BITSADMIN would come to my rescue as there is a \u201c\/TAKEOWNERSHIP\u201d flag. My optimism was short-lived though I got the access denied message again. <\/p>\n<p>So my dilemma was that I needed to mark the job as complete while being logged in as the system account. How was I going to do that?<\/p>\n<p>Then I remembered one way of getting something to run under the context of the system account<\/p>\n<p>Scheduled Tasks!<\/p>\n<p>I setup a batch file with a single command for each listed job<\/p>\n<p><em>BITSADMIN \/COMPLETE &lt;job number&gt; <\/em><\/p>\n<p>Then I set it as a scheduled task to run in a few minutes time. <\/p>\n<p>Once that was complete both of my jobs disappeared from the job queue and my windows update completed as normal.<\/p>\n<p>I\u2019m still at a bit of a loss as to why the jobs were stuck in the first place but I\u2019m just happy it worked in the end!<\/p>\n<p>A full list of the BITSADMIN <a href=\"http:\/\/technet.microsoft.com\/en-us\/library\/cc753856(WS.10).aspx\">switches are here<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Just following on from my last post about SBS 2008 setup hanging while expanding and installing files. I mentioned in the last post that since it appeared to be Windows Update causing the problem I was hoping the update got stuck would be downloaded again when I manually ran the updates. So I started the<\/p>\n<p><a class=\"readmore\" href=\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2011\/01\/19\/sbs-2008-windows-update-and-bits\/\"><span class=\"arrow-right icon\"><\/span>Read More<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[40,107],"tags":[],"class_list":["post-872","post","type-post","status-publish","format-standard","hentry","category-sbs","category-windows-updates"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.11 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>SBS 2008, Windows Update and BITS - Andy&#039;s Techie Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2011\/01\/19\/sbs-2008-windows-update-and-bits\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"SBS 2008, Windows Update and BITS - Andy&#039;s Techie Blog\" \/>\n<meta property=\"og:description\" content=\"Just following on from my last post about SBS 2008 setup hanging while expanding and installing files. I mentioned in the last post that since it appeared to be Windows Update causing the problem I was hoping the update got stuck would be downloaded again when I manually ran the updates. So I started theRead More\" \/>\n<meta property=\"og:url\" content=\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2011\/01\/19\/sbs-2008-windows-update-and-bits\/\" \/>\n<meta property=\"og:site_name\" content=\"Andy&#039;s Techie Blog\" \/>\n<meta property=\"article:published_time\" content=\"2011-01-19T12:54:23+00:00\" \/>\n<meta name=\"author\" content=\"Andy Parkes\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andy Parkes\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2011\/01\/19\/sbs-2008-windows-update-and-bits\/\",\"url\":\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2011\/01\/19\/sbs-2008-windows-update-and-bits\/\",\"name\":\"SBS 2008, Windows Update and BITS - Andy&#039;s Techie Blog\",\"isPartOf\":{\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/#website\"},\"datePublished\":\"2011-01-19T12:54:23+00:00\",\"dateModified\":\"2011-01-19T12:54:23+00:00\",\"author\":{\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/#\/schema\/person\/3534e8ac6b1bec765cd061feff56679d\"},\"breadcrumb\":{\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2011\/01\/19\/sbs-2008-windows-update-and-bits\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2011\/01\/19\/sbs-2008-windows-update-and-bits\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/index.php\/2011\/01\/19\/sbs-2008-windows-update-and-bits\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/andyparkes.co.uk\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"SBS 2008, Windows Update and BITS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/#website\",\"url\":\"https:\/\/andyparkes.co.uk\/blog\/\",\"name\":\"Andy&#039;s Techie Blog\",\"description\":\"Professional Geek\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/andyparkes.co.uk\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/#\/schema\/person\/3534e8ac6b1bec765cd061feff56679d\",\"name\":\"Andy Parkes\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/andyparkes.co.uk\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/3824cbf53df51d7ca5cf809b6ad81a157fbfff2292e36ab8666f04ddad06bfcc?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/3824cbf53df51d7ca5cf809b6ad81a157fbfff2292e36ab8666f04ddad06bfcc?s=96&d=mm&r=g\",\"caption\":\"Andy Parkes\"},\"description\":\"Andy Parkes is Technical Director at Coventry based IT support company IBIT Solutions. Formerly, coordinator of AMITPRO and Microsoft Partner Area Lead for 2012-2013. He also isn't a fan of describing himself in the third person.\",\"sameAs\":[\"http:\/\/www.andyparkes.co.uk\/blog\"],\"url\":\"https:\/\/andyparkes.co.uk\/blog\/index.php\/author\/andyparkes\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"SBS 2008, Windows Update and BITS - Andy&#039;s Techie Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2011\/01\/19\/sbs-2008-windows-update-and-bits\/","og_locale":"en_US","og_type":"article","og_title":"SBS 2008, Windows Update and BITS - Andy&#039;s Techie Blog","og_description":"Just following on from my last post about SBS 2008 setup hanging while expanding and installing files. I mentioned in the last post that since it appeared to be Windows Update causing the problem I was hoping the update got stuck would be downloaded again when I manually ran the updates. So I started theRead More","og_url":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2011\/01\/19\/sbs-2008-windows-update-and-bits\/","og_site_name":"Andy&#039;s Techie Blog","article_published_time":"2011-01-19T12:54:23+00:00","author":"Andy Parkes","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Andy Parkes","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2011\/01\/19\/sbs-2008-windows-update-and-bits\/","url":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2011\/01\/19\/sbs-2008-windows-update-and-bits\/","name":"SBS 2008, Windows Update and BITS - Andy&#039;s Techie Blog","isPartOf":{"@id":"https:\/\/andyparkes.co.uk\/blog\/#website"},"datePublished":"2011-01-19T12:54:23+00:00","dateModified":"2011-01-19T12:54:23+00:00","author":{"@id":"https:\/\/andyparkes.co.uk\/blog\/#\/schema\/person\/3534e8ac6b1bec765cd061feff56679d"},"breadcrumb":{"@id":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2011\/01\/19\/sbs-2008-windows-update-and-bits\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/andyparkes.co.uk\/blog\/index.php\/2011\/01\/19\/sbs-2008-windows-update-and-bits\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/andyparkes.co.uk\/blog\/index.php\/2011\/01\/19\/sbs-2008-windows-update-and-bits\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/andyparkes.co.uk\/blog\/"},{"@type":"ListItem","position":2,"name":"SBS 2008, Windows Update and BITS"}]},{"@type":"WebSite","@id":"https:\/\/andyparkes.co.uk\/blog\/#website","url":"https:\/\/andyparkes.co.uk\/blog\/","name":"Andy&#039;s Techie Blog","description":"Professional Geek","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/andyparkes.co.uk\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/andyparkes.co.uk\/blog\/#\/schema\/person\/3534e8ac6b1bec765cd061feff56679d","name":"Andy Parkes","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/andyparkes.co.uk\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/3824cbf53df51d7ca5cf809b6ad81a157fbfff2292e36ab8666f04ddad06bfcc?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/3824cbf53df51d7ca5cf809b6ad81a157fbfff2292e36ab8666f04ddad06bfcc?s=96&d=mm&r=g","caption":"Andy Parkes"},"description":"Andy Parkes is Technical Director at Coventry based IT support company IBIT Solutions. Formerly, coordinator of AMITPRO and Microsoft Partner Area Lead for 2012-2013. He also isn't a fan of describing himself in the third person.","sameAs":["http:\/\/www.andyparkes.co.uk\/blog"],"url":"https:\/\/andyparkes.co.uk\/blog\/index.php\/author\/andyparkes\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pmvJ6-e4","jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/posts\/872","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/comments?post=872"}],"version-history":[{"count":0,"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/posts\/872\/revisions"}],"wp:attachment":[{"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/media?parent=872"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/categories?post=872"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/andyparkes.co.uk\/blog\/index.php\/wp-json\/wp\/v2\/tags?post=872"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}