View Full Version : Windows/Microsoft Update - any way to force the desktop version to run?
sallonoroff 27-02-2008, 12:46 Anyone know how to get the "desktop" version (the one that pops up from the taskbar) of Microsoft Update to run?
Should "wuauclt /detectnow" just do it?
Also, if said program has downloaded the updates, but then the icon disappears from the Taskbar before you allow it to install the updates, is there anyway to get it to run again, and do the install (without choosing to shutdown Windows)?
Cheers.
.
If you run the browser version I'm pretty sure that if you have any downloaded, but not yet installed updates, then it takes care of those too.
Sorry, never allow my achines to auto-update so no idea how to use the "desktop" version.
Assuming Windows XP btw - no idea about Vista.
sallonoroff 28-02-2008, 13:32 Yes, Win XP...
I've never been a fan of the Windows Update process anyway... but I don't like having to use the webpage version, as it seems to cockup more often than the "desktop" version. (Or is that just because the taskbar pop-up only pops-up when it's working... so you never see errors?! :D)
.
Its always worked ok for me.
I prefer to do it manually, so that if the PC ever does start playing up at least I know what I can rule in or out.
If it can do it's own thing how am I to know if something has changed, if I miss the pop-up?
Having said that, I'm only aware of one update that caused problems a few years ago, but I still like to think I'm in charge!
I prefer the web page version using the "Custom" update so I can select the updates I want, for example I didn't like what IE7 did to my PC so I went back to a previous backup and excluded IE7 from future updates despite M$ saying it's a high priority one, I'm not sure if the express install or the auto update would take this preference into account
sallonoroff 28-02-2008, 14:56 Sorry, i should have said... i prefer the "Custom" option too, and have machines set to just notify about updates, rather than download or install them automatically.
I just want to be able to get the desktop/taskbar version to appear on command, rather than having to wait for it... especially if i have already told OK to download, then the option to install doesn't pop back up.
.
this http://msdn2.microsoft.com/en-us/library/aa387102.aspx is about the nearest I can find to what you want
you should be able to adapt the code to skip downloading fairly easily, at first glance there seems to be a single loop handling downloads, and use the remainder to apply those that have already been fetched by wauclt
doesn't look like there's a simple command though
sallonoroff 29-02-2008, 13:58 Thanks for the link esme - nice find. It is interesting to see what can be done with scripting.
Sadly i have no knowledge of vbscript... so i'm not sure i could re-work the sample code to do what i wanted. Well, not quickly anyway. I can see what you're suggesting, but i wouldn't know where to tell it to look for existing downloads or how to!
Oh well, guess i'll stick to the web interface, or waiting... (it wasn't a big problem in the first place - i was just curious)
PS. Here are a few things i've discovered while looking into this... in case they're of any use to someone...
Windows Update Downloader - http://wud.jcarle.com/Default.aspx
Project Dakota - http://www.theatticnetwork.net/about.php
Autopatcher - http://www.autopatcher.com/ (I knew of Autopatcher before, but i thought it'd been shutdown. Apparently not though...)
.
hi moonlight
the code seems to know where to look for updates based on the tests I've done on my pc
I've tweaked the code a little, it's basically the same as before only now it asks you if you want to download particular updates
say yes and it gets downloaded and added to the update list
then it will install ALL the updates that are downloaded
Set updateSession = CreateObject("Microsoft.Update.Session")
Set updateSearcher = updateSession.CreateupdateSearcher()
WScript.Echo "Searching for updates..." & vbCRLF
Set searchResult = _
updateSearcher.Search("IsInstalled=0 and Type='Software'")
' check to see if there are any items that need updating
WScript.Echo "List of applicable items on the machine: - these are items for which there updates are available"
For I = 0 To searchResult.Updates.Count-1
Set update = searchResult.Updates.Item(I)
WScript.Echo I + 1 & "> " & update.Title
Next
If searchResult.Updates.Count = 0 Then
WScript.Echo "There are no applicable updates."
WScript.Quit
End If
' download updates giving the user the option to say no
WScript.Echo vbCRLF & "Creating collection of updates to download:"
Set updatesToDownload = CreateObject("Microsoft.Update.UpdateColl")
For I = 0 to searchResult.Updates.Count-1
Set update = searchResult.Updates.Item(I)
WScript.Echo I + 1 & "> download: " & update.Title & " (Y/N)"
strInput = WScript.StdIn.Readline
If (strInput = "Y" or strInput = "y") Then
updatesToDownload.Add(update)
End If
Next
' download the updates
WScript.Echo vbCRLF & "Downloading updates..."
Set downloader = updateSession.CreateUpdateDownloader()
downloader.Updates = updatesToDownload
downloader.Download()
WScript.Echo vbCRLF & "List of downloaded updates:"
For I = 0 To searchResult.Updates.Count-1
Set update = searchResult.Updates.Item(I)
If update.IsDownloaded Then
WScript.Echo I + 1 & "> " & update.Title
End If
Next
' build a list of updates to install
Set updatesToInstall = CreateObject("Microsoft.Update.UpdateColl")
WScript.Echo vbCRLF & _
"Creating collection of downloaded updates to install:"
For I = 0 To searchResult.Updates.Count-1
set update = searchResult.Updates.Item(I)
If update.IsDownloaded = true Then
WScript.Echo I + 1 & "> adding: " & update.Title
updatesToInstall.Add(update)
End If
Next
' install the updates
WScript.Echo vbCRLF & "Would you like to install updates now? (Y/N)"
strInput = WScript.StdIn.Readline
WScript.Echo
If (strInput = "N" or strInput = "n") Then
WScript.Quit
ElseIf (strInput = "Y" or strInput = "y") Then
WScript.Echo "Installing updates..."
Set installer = updateSession.CreateUpdateInstaller()
installer.Updates = updatesToInstall
Set installationResult = installer.Install()
'Output results of install
WScript.Echo "Installation Result: " & _
installationResult.ResultCode
WScript.Echo "Reboot Required: " & _
installationResult.RebootRequired & vbCRLF
WScript.Echo "Listing of updates installed " & _
"and individual installation results:"
For I = 0 to updatesToInstall.Count - 1
WScript.Echo I + 1 & "> " & _
updatesToInstall.Item(i).Title & _
": " & installationResult.GetUpdateResult(i).ResultCode
Next
End If
sallonoroff 05-03-2008, 10:49 Thanks for that esme. I'll give a try and see how it goes...
.
I found I had five updates downloaded but not installed on my machine using this, I didn't actually want them installed either, I'm currently looking at how I can safely delete them
they seem to be sat in C:\WINDOWS\SoftwareDistribution\Download\ but there may be registry entries so I'm doing the research first, if you have any pointers I'm all ears
|