Solved

How to install already downloaded updates in a networked Vista machine

Posted on 2009-07-15
32
711 Views
Last Modified: 2013-11-08
I use a Vista machine which is a member of a domain network. It gets updates from WSUS servers. Every now and then, I see the "New updates are available" icon on the system tray, which means I can install new updates that have already been downloaded to my machine.

The problem is, the only way I can install these updates is through the Shutdown button on the Windows Start button. Is there any other way (a command prompt, for instance) that I can installed already downloaded updates? Since my computer is set up to get updates from WSUS server through Group Policy, I don't have much access to the features of Windows Updates in Control Panel. But I believe there should be a way other than shutting my computer down in order to install updates.
0
Comment
Question by:behterami
  • 11
  • 9
  • 8
  • +1
32 Comments
 
LVL 47

Expert Comment

by:dstewartjr
Comment Utility
0
 

Author Comment

by:behterami
Comment Utility
As I said, it's being already set up by network administrator and I can get updates.
The problem is I don't know how I can get them installed without pressing the shutdown button on Windows. I'd like to install them manually.
0
 
LVL 47

Expert Comment

by:dstewartjr
Comment Utility
The point is since the group policy is configured this way,  this will be your only option.
0
 
LVL 47

Expert Comment

by:dstewartjr
Comment Utility
The above links were provided to guide you where to make the GPO changes.
0
 

Author Comment

by:behterami
Comment Utility
So, why was it possible in XP?

When you get new updates downloaded in a XP machine, you have the option to click on the yellow shield icon to install them, or make them be installed while you turn your pc off. This is true even in a machine that is a member of a domain and gets updates from WSUS server.
0
 
LVL 47

Expert Comment

by:dstewartjr
Comment Utility
0
 

Author Comment

by:behterami
Comment Utility
Hmmm
Interesting but still not what I am looking for.
0
 
LVL 47

Expert Comment

by:dstewartjr
Comment Utility

It looks like there is a difference between the registry settings in Vista and XP

NoAUAsShutdownOption<<<<is the Vista registry key




InstallUpdatesandShutdown<<<<< is the XP registry key


so it may be a Group Policy Preference Client Side Extensions issue

http://www.microsoft.com/downloads/details.aspx?FamilyId=AB60DC87-884C-46D5-82CD-F3C299DAC7CC&displaylang=en
0
 

Author Comment

by:behterami
Comment Utility
But in both case, that makes my computer shutdown after updates are installed.
I WANT TO INSTALL THEM WITHOUT SHUTTING DOWN.
0
 
LVL 47

Expert Comment

by:dstewartjr
Comment Utility
1. You need to then talk to your network admin
2. This is an obvious gpo setting(that I have been stressing from the beginning)
3. I was pointing out that you may need install the client side extensions in order get the appropriate settings to adjust it.
4. Shouting at me will get you nowhere.
0
 
LVL 10

Expert Comment

by:remmett70
Comment Utility
I see the same thing on one of the Vista machines I take care of.  The GPO is set to have the computer update every Thurdsay evening automatically.  When updates are available, there is not the Install updates Icon in the item tray.  My home Vista machine is set to download and let me choose when to install.  With those settings I get the icon in the item tray.

What are the settings of your Vista machines updates?
0
 
LVL 47

Accepted Solution

by:
dstewartjr earned 500 total points
Comment Utility
Here's a good alternative for you.
Save the below as getmissingupdates.hta
 
Double click on it and click start. It will check if your machine has any missing updates, provide you with a download link to download/install. All from your WSUS server.

<html>

<title>Get Missing Updates</title>

<!--

Filename: GetMissingUpdates.hta
 

Author: Torgeir Bakken

Date: 2005-08-21 (version 1.0)
 

Purpose:
 

- Get a list of missing updates including download links

from WSUS server using mbsacli.exe
 

Dependencies:
 

- mbsacli.exe (that depends on wusscan.dll)
 

Version History:
 

version 1.0 (2005-08-21)
 
 

-->

<hta:application

id="ListMissingUpdates"

version = "1.0"

applicationname="ListMissingUpdates"

singleinstance="yes"

windowstate="normal"

caption="yes"

showintaskbar="yes"

sysmenu="yes"

scroll="no"

/>

<style>

body,table {

font:x-small verdana;

background-color:gainsboro;

}

input {

font:x-small arial;

}

</style>
 

<script language="vbscript">
 

Option Explicit
 

Dim bClosing
 

bClosing = false
 
 

sub window_onload()
 

idStartButton.focus

idStatusMsg.innerHTML = "<b>Click Start to begin"

end Sub
 
 

sub window_onbeforeunload()
 

bClosing = true
 

end sub
 

sub DoExtract()
 

dim buf,bIsHidden
 

if idControls.disabled then exit sub
 

idStatusMsg.innerHTML = "&nbsp;"

idUpdates.document.body.innerText = ""
 

idControls.disabled = true
 

Const OverwriteIfExist = -1

Const OpenAsASCII   =  0
 

Dim sXMLFilePath, sXPath, oXMLDoc, oErr, oFSO, oShell

Dim sMsgBoxTitle, sStdErr, sStdErrFilePath, sMBSAFilePath

Dim sCabFilePath, sMBSACmdSwitches, sCmd
 

' -------  Section with variables you can/must change  -------
 
 

' Path and name of mbsacli.exe, environment variables allowed

sMBSAFilePath = "\\gmbserver1\patches\mbsacli.exe"
 
 

' Command line switches to be used for mbsacli.exe

' Using /xmlout to run in updates only mode using only mbsacli.exe

' and wusscan.dll. Only these switches can be used with this option:

' /catalog, /wa, /wi, /nvc, /unicode

sMBSACmdSwitches = "/xmlout /nvc /wa"
 
 

' Path and name of wsusscan.cab, environment variables allowed.

' Note that microsoft does not support placement on a network drive.

' Set it to "" if you do not want to use the /catalog switch

' If this string is not empty (""), /catalog <cab file path> will

' be added to the command line of mbsacli.exe

' Mote that when using the switch /wa or /wi, wsusscan.cab is

' not needed because all meta data is fetch from the WSUS server.

sCabFilePath = ""
 
 

' Title to be used by MsgBox commands

sMsgBoxTitle = "MBSA Update Check"
 
 

' -------  Section that prepares for running mbsacli.exe  -------
 

sXPath = "//UpdateData[@IsInstalled='false']"
 

Set oShell = CreateObject("WScript.Shell")

Set oFSO = CreateObject("Scripting.FileSystemObject")
 

sMBSAFilePath = oShell.ExpandEnvironmentStrings(sMBSAFilePath)

If oFSO.FileExists(sMBSAFilePath) Then

sMBSAFilePath = oFSO.GetFile(sMBSAFilePath).ShortPath

Else

idStatusMsg.innerHTML = "&nbsp;"

idStatusMsg.innerHTML = "<font color=red><b>MBSA run failed</b></font>"

MsgBox sMBSAFilePath & " does not exist!", _

vbCritical + vbSystemModal, sMsgBoxTitle

idControls.disabled = false

Exit Sub

End If
 

If sCabFilePath <> "" Then

sCabFilePath = oShell.ExpandEnvironmentStrings(sCabFilePath)

If oFSO.FileExists(sCabFilePath) Then

sCabFilePath = oFSO.GetFile(sCabFilePath).ShortPath

sMBSACmdSwitches = sMBSACmdSwitches & " /catalog " & sCabFilePath

Else

idStatusMsg.innerHTML = "&nbsp;"

idStatusMsg.innerHTML = "<font color=red><b>MBSA run failed</b></font>"

MsgBox sCabFilePath & " does not exist!", _

vbCritical + vbSystemModal, sMsgBoxTitle

Exit Sub

idControls.disabled = false

Exit Sub
 

End If

End If
 

' Get a temporary file name for xml file MbsaCli.exe creates

Do

sXMLFilePath = oFSO.GetSpecialFolder(2).ShortPath _

& "\" & oFSO.GetTempName

Loop While oFSO.FileExists(sXMLFilePath)
 

' Get a temporary file name for the stderr file MbsaCli.exe creates

Do

sStdErrFilePath = oFSO.GetSpecialFolder(2).ShortPath _

& "\" & oFSO.GetTempName

Loop While oFSO.FileExists(sStdErrFilePath)
 
 

' As the ShortPath property have been used for all paths, extra

' quotes are not needed

sCmd = "%comspec% /c " & sMBSAFilePath & " " & sMBSACmdSwitches _

& " >" & sXMLFilePath & " 2>" & sStdErrFilePath
 
 

' -------  Section that runs mbsacli.exe and checks the result  -------
 

idStatusMsg.innerHTML = "&nbsp;"

idStatusMsg.innerHTML = _

"<b>Running Mbsacli.exe against WSUS server, please wait.."
 

oShell.Run sCmd, 0, True
 

sStdErr = CheckStdErr(sStdErrFilePath)
 
 

On Error Resume Next

oFSO.DeleteFile sStdErrFilePath

On Error Goto 0
 

If sStdErr <> "" Then

idStatusMsg.innerHTML = "&nbsp;"

idStatusMsg.innerHTML = "<font color=red><b>MBSA run failed</b></font>"

MsgBox "MBSA failed, error was:" & vbNewLine & vbNewLine & sStdErr, _

vbCritical + vbSystemModal, sMsgBoxTitle
 

On Error Resume Next

oFSO.DeleteFile sXMLFilePath

On Error Goto 0

idControls.disabled = false

Exit Sub
 

End If
 

idStatusMsg.innerHTML = "&nbsp;"

idStatusMsg.innerHTML = "<b>Building output view"
 
 

' -------  Section that parses the output in the xml file  -------
 

Set oXMLDoc = CreateObject("MSXML2.DOMDocument")

oXMLDoc.SetProperty "SelectionLanguage", "XPath"

oXMLDoc.Async = False
 

oXMLDoc.Load sXMLFilePath
 

If (oXMLDoc.parseError.errorCode <> 0) Then

idStatusMsg.innerHTML = "&nbsp;"

idStatusMsg.innerHTML = "<font color=red><b>MBSA run failed</b></font>"

Set oErr = oXMLDoc.ParseError

MsgBox "Could not load file " & sXMLFilePath _

& " , error: " & oErr.Reason, _

vbCritical + vbSystemModal, sMsgBoxTitle
 

idControls.disabled = false

Exit Sub

End If
 
 

Dim dicElements, oNodes, oElement

Dim sGUID, sID, iType, iSeverity, bRestartRequired

Dim bIsInstalled, sTitle, sBulletinURL, sInformationURL, sDownloadURL

Dim sType, sSeverity
 

' use a dictionary object to filter out double entries (will

' exist e.g. for WSUS scans).

Set dicElements = CreateObject("Scripting.Dictionary")

dicElements.CompareMode = vbTextCompare
 

Set oNodes = oXMLDoc.DocumentElement.SelectNodes(sXPath)
 

On Error Resume Next

For Each oElement in oNodes
 

sGUID = ""  ' init value

sGUID = oElement.getAttribute("GUID")
 

If Not dicElements.Exists(sGUID) Then

' init values

sID = "": iType = "": iSeverity = ""

bIsInstalled = "": bRestartRequired = "": sTitle = ""

sBulletinURL = "": sInformationURL = "": sDownloadURL = ""

sType = "": sSeverity = ""
 

sID = oElement.getAttribute("ID")
 

iType = CInt(oElement.getAttribute("Type"))

Select Case iType

Case 1

sType = "Security Update"

Case 2

sType = "Service Pack"

Case 3

sType = "Update Rollup"

End Select
 

iSeverity =  CInt(oElement.getAttribute("Severity"))

Select Case iSeverity

Case 0

sSeverity = "(no rating)"

Case 1

sSeverity = "Low"

Case 2

sSeverity = "Moderate"

Case 3

sSeverity = "Important"

Case 4

sSeverity = "Critical"

End Select
 

bIsInstalled = CBool(oElement.getAttribute("IsInstalled"))

bRestartRequired = CBool(oElement.getAttribute("RestartRequired"))

sTitle = oElement.selectSingleNode("Title").text
 

sBulletinURL = oElement.selectSingleNode _

("References/BulletinURL").text
 

sInformationURL = oElement.selectSingleNode _

("References/InformationURL").text
 

sDownloadURL = oElement.selectSingleNode _

("References/DownloadURL").text
 

' using the GUID value as dictionary key

dicElements.Add sGUID, _

Array( _

sID, _

sType, _

sSeverity, _

bIsInstalled, _

bRestartRequired, _

sTitle, _

sBulletinURL, _

sInformationURL, _

sDownloadURL)

End If
 

Next

oFSO.DeleteFile sXMLFilePath

On Error Goto 0
 
 

' -------  Section that creates the report -------
 

set buf = new clsBuffer
 

buf.add "<html><body>"
 
 

If dicElements.Count = 0 Then
 

buf.add "<font size=4pt>"

buf.add "<BR><B>No missing updates found.</B>"

buf.add "</font>"
 

Else
 

Dim sDicElement, sID_URL
 

buf.add "<font size=4pt>"

buf.add "<B>" & dicElements.Count & " security updates are missing.</B>"

buf.add "</font>"

buf.add "<BR><BR><B>Result Details:</B><BR><BR>"

buf.add "<table BORDER=1 cellpadding=""5%""><tr bgcolor='silver'>"

buf.add "<td>ID</td><td>Description</td>"

buf.add "<td>Maximum<BR>Severity</td>"

buf.add "<td>Download<BR>Link</td>"

buf.add "</tr>"
 

For Each sDicElement In dicElements
 

sBulletinURL = dicElements.Item(sDicElement)(6)

sInformationURL = dicElements.Item(sDicElement)(7)

If sBulletinURL = "" Then

' use Information URL

sID_URL = sInformationURL

Else

' use Bulletin URL

sID_URL = sBulletinURL

End If
 

sID = dicElements.Item(sDicElement)(0)

sSeverity = dicElements.Item(sDicElement)(2)

sTitle = dicElements.Item(sDicElement)(5)

sDownloadURL = dicElements.Item(sDicElement)(8)
 

buf.add "<tr>"

buf.add "<td><a href=" & sID_URL & " target=""_blank"">" _

& sID & "</a></td>"

buf.add "<td><a href=" & sInformationURL & " target=""_blank"">" _

& sTitle & "</a></td>"

buf.add "<td>" & sSeverity & "</td>"

buf.add "<td><a href=" & sDownloadURL _

& " target=""_blank"">Download</a></td>"

buf.add "</tr>"
 

Next
 

buf.add "</table>"
 

End If
 
 

buf.add "</html></body>"
 

' display the result

idUpdates.document.body.innerHTML = buf.contents
 

idStatusMsg.innerHTML = "&nbsp;"

idStatusMsg.innerHTML = "<b>Finished!"
 

idControls.disabled = false
 

End Sub
 
 

Function CheckStdErr(ByVal sFile)
 

Const OpenAsASCII      =  0

Const FailIfNotExist   =  0

Const ForReading       =  1
 

Dim oFSO, fFile, i, sValue, sLine
 

Set oFSO = CreateObject("Scripting.FileSystemObject")
 

If oFSO.GetFile(sFile).Size = 0 Then

CheckStdErr = "Something is wrong, StdErr file size is 0 byte!"

Exit Function    ' ----->

End If
 

Set fFile = oFSO.OpenTextFile(sFile, ForReading, _

FailIfNotExist, OpenAsASCII)
 

' Skip first 4 lines that always just contains the same header info

For i = 1 To 4

fFile.SkipLine

Next
 

sValue = ""   ' init value
 

'Parse the rest of the text file

Do While Not fFile.AtEndOfStream

sLine = fFile.Readline

If sLine <> "" Then

If sValue = "" Then

sValue = sLine

Else

sValue = sValue & vbNewLine & sLine

End If

End If

Loop
 

fFile.Close
 

CheckStdErr = sValue
 

End Function
 
 

class clsBuffer
 

private m_buffer

private m_index

private m_delimiter
 

sub class_initialize

me.clear

m_delimiter = vbcrlf

end sub
 

sub clear

m_buffer = array()

m_index = -1

end sub
 

sub add(str)

m_index = m_index+1

redim preserve m_buffer(m_index)

m_buffer(m_index) = str

end sub
 

property get contents()

contents = join(m_buffer,m_delimiter)

end property
 

property get count()

count = ubound(m_buffer)+1

end property
 

property get delimiter()

delimiter = m_delimiter

end property
 

property let delimiter(arg)

m_delimiter = arg

end property
 

end Class
 
 

</script>
 

</head>

<body style="margin:0px;">

<table id="idControls" cellspacing=5>

<tr>

<td><INPUT TYPE="button"

id="idStartButton"

title="Run mbsacli and generate a list of missing updates"

onclick='DoExtract'

value="Start"></td>

</tr>

</table>

<iframe

id="idUpdates"

style="height:expression(document.body.clientHeight-idControls

.clientHeight-idStatusArea.clientHeight);width:100%;">

</iframe>

<table id="idStatusArea" style="width:100%;border:2px inset">

<tr>

<td nowrap id="idStatusMsg">&nbsp;</td>

<tr>

</table>

</body>

</html>

Open in new window

0
 
LVL 20

Expert Comment

by:MightySW
Comment Utility
Yes, Vista doesn't work like XP with WUAU service. The same GPOs that allow XP to let a user install updates will AUTOMATICALLY install themselves on Vista and ask the user to restart (by default every 10 minutes).  You can of course snooze this, but it is just how MS programmed it to work with BITS.  They needed Vista to be a staple of security and when receiving so much flak because users were given the choice to NOT install their updates when prompted.  

This is what happens and what Dstew said is QUITE appropriate.

Good luck.
0
 

Author Comment

by:behterami
Comment Utility
Originally I selected this answer as accepted solution, becasue it stated that this is a built-in feature in Vista to force users to install updates. But I just found a brand new Vista machine, joined it to our domain and downloaded the updates from our internal WSUS. Surprisingly, I found that it lets me install updated downloads simply by clicking on the icon on the system tray. That means, my own Vista has some thing changed that doesn't let me install without turn my machine off. In other words, it's not a built-in feature of Vista. Therefore, I'd like to retake my vote and neither MightySW nor dstewartjr gave me a correct answer.
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 20

Expert Comment

by:MightySW
Comment Utility
Yes it is.  This is insane.  
0
 
LVL 20

Expert Comment

by:MightySW
Comment Utility
I wanted you to give the points to Dstew as HE DID ANSWER THE QUESTION AS YOU ASKED IT.  What I told you was also true in a lower level.  

We both gave you correct answers.  Just because you think that you saw something different doesn't mean that you know what is happening in the background.  

Please award all points to Dstew.  

Moderator, keep this question open and force all points to DstewartJr as he more than answered the question.

Thanks
0
 

Author Comment

by:behterami
Comment Utility
MightySW, can you please state which answers from DstewartJr is the correct answer?
0
 
LVL 20

Expert Comment

by:MightySW
Comment Utility
All of them.
0
 
LVL 20

Expert Comment

by:MightySW
Comment Utility
Pick one.
0
 

Author Comment

by:behterami
Comment Utility
it seems you do not know the difference between an "answer" and a "correct comment". Although what DstewartJr commented were all correct, they were not my answer.

I want to ask you to re-read both my problem and my question carefully. The policy settings that DstewartJr refered me to, are not what I need. Besides, I have not access to the Group Policy, as it's being set up by network admin. XP/2003 users simply double click on the yellow shield and install "downloaded updates", but me, as a Vista user, have no option to install downloaded updates other than getting my machine shut down.

As I stated in one of my comments, I found a brand new Vista machine yesterday that is joined to the same domain as mine and gets the same policy as mine, but it has the user has the ability to click on the icon to install updates after he/she receives the prompt "new updates are ready to install on your machine".
0
 
LVL 47

Expert Comment

by:dstewartjr
Comment Utility
Based on your question history, you just dont want to accept the correct answer. I'm sure Mightysw and the Mods would agree.
0
 
LVL 47

Expert Comment

by:dstewartjr
Comment Utility
here  you go:


Windows Vista for dummies
0
 
LVL 20

Expert Comment

by:MightySW
Comment Utility
Yes, I have this option in Vista as well however it is a local policy that is only being applied to your machine or a local security setting or some Vista component that just Is not the same as yours.

Did you compare RSOP with the other Vista machine by comparing the results of the gpresults command?
0
 
LVL 20

Expert Comment

by:MightySW
Comment Utility
I propose:

DstewartJr's comment above:

Here's a good alternative for you.

Save the below as getmissingupdates.hta

Double click on it and click start. It will check if your machine has any missing updates, provide you with a download link to download/install. All from your WSUS server.

<Code Snippet>
0
 
LVL 47

Expert Comment

by:dstewartjr
Comment Utility
That would be ID:24871395
0
 
LVL 20

Expert Comment

by:MightySW
Comment Utility
Thanks
0
 

Author Comment

by:behterami
Comment Utility
the forced accept (ID:24871395) does not work in my computer. it opens a blank window and then nothing.
0
 
LVL 20

Expert Comment

by:MightySW
Comment Utility
It is closed.  
0
 
LVL 47

Expert Comment

by:dstewartjr
Comment Utility
Modify the section titled
 
 
' -------  Section with variables you can/must change  -------
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
The Task Scheduler is a powerful tool that is built into Windows. It allows you to schedule tasks (actions) on a recurring basis, such as hourly, daily, weekly, monthly, at log on, at startup, on idle, etc. This video Micro Tutorial is a brief intro…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now