locked
Deploy Windows Installer 4.5 RRS feed

  • Question

  • Not sure if this is the correct forum but I couldn't see one that fitted my question. I'm looking to deploy Windows Installer to Vista (and XP) clients but I'm unsure how to do it. I haven't got SCCM and standard Group Policy software deployment only supports .msi files and the redist for installer 4.5 is an exe. WSUS is not supporting installer 4.5 either. How can I deploy this update?

    Hibs Ya Bass!

    Thursday, May 3, 2012 11:20 PM

Answers

  • Hi you can do this using VBSCRIPT:

    sExePath = "\\server\share\WindowsXP-KB942288-v3-x86.exe"
    sSwitches = " /quiet /norestart"


    Set oShell = CreateObject("WScript.Shell")


    sRegKey = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate"


    ' suppress error in case values does not exist
    On Error Resume Next


    ' check for marker
    sRegMarkerValue = ""  ' init value
    sRegMarkerValue = oShell.RegRead( sRegKey & "\WindowsXP-KB942288-v3-x86.exe"
    On Error Goto 0


    ' to be sure update is installed only once, test on marker
    If sRegMarkerValue <> "yes" Then


       oShell.Run Chr(34) & sExePath & Chr(34) & " " & sSwitches, 1, True

       ' create marker
       oShell.RegWrite sRegKey & "\WindowsXP-KB942288-v3-x86.exe", "yes"
    End If

    source:http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Q_25410618.html


    Kind regards,

    Tim
    MCITP, MCTS
    http://directoryadmin.blogspot.com

    This posting is provided 'AS IS' with no warranties or guarantees and confers no rights.

    • Marked as answer by broonster27 Wednesday, May 9, 2012 5:24 AM
    Friday, May 4, 2012 6:34 AM
  • Hi you can do this using VBSCRIPT:

    sExePath = "\\server\share\WindowsXP-KB942288-v3-x86.exe"
    sSwitches = " /quiet /norestart"


    Set oShell = CreateObject("WScript.Shell")


    sRegKey = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate"


    ' suppress error in case values does not exist
    On Error Resume Next


    ' check for marker
    sRegMarkerValue = ""  ' init value
    sRegMarkerValue = oShell.RegRead( sRegKey & "\WindowsXP-KB942288-v3-x86.exe"
    On Error Goto 0


    ' to be sure update is installed only once, test on marker
    If sRegMarkerValue <> "yes" Then


       oShell.Run Chr(34) & sExePath & Chr(34) & " " & sSwitches, 1, True

       ' create marker
       oShell.RegWrite sRegKey & "\WindowsXP-KB942288-v3-x86.exe", "yes"
    End If

    source:http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Q_25410618.html


    Kind regards,

    Tim
    MCITP, MCTS
    http://directoryadmin.blogspot.com

    This posting is provided 'AS IS' with no warranties or guarantees and confers no rights.

    I tweaked your script and instead of checking for WSUS updates I check the version of the msi.dll that way it will work for both Vista and XP (as long the DLL is in the right place ). I still need to create two scripts though as the updates files for Vista and XP are different. I then call that VBS script from a Group Policy Startup Script with a WMI filter for XP and Vista.

    sExePath = "\\natserver3\updates$\Windows6.0-KB942288-v2-x86.msu"
    sSwitches = "/quiet /norestart"

    Set oShell = CreateObject("WScript.Shell")


    Set objFSO = CreateObject("Scripting.FileSystemObject")
    installerVer = left(objFSO.GetFileVersion("c:\windows\system32\MSI.DLL"),3)
    wscript.echo installerVer

    If installerVer <> "4.5" Then
        oShell.Run Chr(34) & sExePath & Chr(34) & " " & sSwitches, 1, True
    End If
        
       


    Hibs Ya Bass!

    • Marked as answer by broonster27 Wednesday, May 9, 2012 5:24 AM
    Wednesday, May 9, 2012 5:24 AM

All replies

  • Hi you can do this using VBSCRIPT:

    sExePath = "\\server\share\WindowsXP-KB942288-v3-x86.exe"
    sSwitches = " /quiet /norestart"


    Set oShell = CreateObject("WScript.Shell")


    sRegKey = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate"


    ' suppress error in case values does not exist
    On Error Resume Next


    ' check for marker
    sRegMarkerValue = ""  ' init value
    sRegMarkerValue = oShell.RegRead( sRegKey & "\WindowsXP-KB942288-v3-x86.exe"
    On Error Goto 0


    ' to be sure update is installed only once, test on marker
    If sRegMarkerValue <> "yes" Then


       oShell.Run Chr(34) & sExePath & Chr(34) & " " & sSwitches, 1, True

       ' create marker
       oShell.RegWrite sRegKey & "\WindowsXP-KB942288-v3-x86.exe", "yes"
    End If

    source:http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Q_25410618.html


    Kind regards,

    Tim
    MCITP, MCTS
    http://directoryadmin.blogspot.com

    This posting is provided 'AS IS' with no warranties or guarantees and confers no rights.

    • Marked as answer by broonster27 Wednesday, May 9, 2012 5:24 AM
    Friday, May 4, 2012 6:34 AM
  • That will only work for XP, unfortunately I also need to target Vista machines.

    Hibs Ya Bass!

    Sunday, May 6, 2012 8:34 PM
  • Hi,

    for Vista checking this:

    http://www.nigelboulton.co.uk/2011/01/installing-a-windows-hotfix-on-multiple-machines-using-a-powershell-script/


    Kind regards,

    Tim
    MCITP, MCTS
    http://directoryadmin.blogspot.com

    This posting is provided 'AS IS' with no warranties or guarantees and confers no rights.

    Monday, May 7, 2012 6:33 AM
  • Hi you can do this using VBSCRIPT:

    sExePath = "\\server\share\WindowsXP-KB942288-v3-x86.exe"
    sSwitches = " /quiet /norestart"


    Set oShell = CreateObject("WScript.Shell")


    sRegKey = "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\WindowsUpdate"


    ' suppress error in case values does not exist
    On Error Resume Next


    ' check for marker
    sRegMarkerValue = ""  ' init value
    sRegMarkerValue = oShell.RegRead( sRegKey & "\WindowsXP-KB942288-v3-x86.exe"
    On Error Goto 0


    ' to be sure update is installed only once, test on marker
    If sRegMarkerValue <> "yes" Then


       oShell.Run Chr(34) & sExePath & Chr(34) & " " & sSwitches, 1, True

       ' create marker
       oShell.RegWrite sRegKey & "\WindowsXP-KB942288-v3-x86.exe", "yes"
    End If

    source:http://www.experts-exchange.com/OS/Microsoft_Operating_Systems/Q_25410618.html


    Kind regards,

    Tim
    MCITP, MCTS
    http://directoryadmin.blogspot.com

    This posting is provided 'AS IS' with no warranties or guarantees and confers no rights.

    I tweaked your script and instead of checking for WSUS updates I check the version of the msi.dll that way it will work for both Vista and XP (as long the DLL is in the right place ). I still need to create two scripts though as the updates files for Vista and XP are different. I then call that VBS script from a Group Policy Startup Script with a WMI filter for XP and Vista.

    sExePath = "\\natserver3\updates$\Windows6.0-KB942288-v2-x86.msu"
    sSwitches = "/quiet /norestart"

    Set oShell = CreateObject("WScript.Shell")


    Set objFSO = CreateObject("Scripting.FileSystemObject")
    installerVer = left(objFSO.GetFileVersion("c:\windows\system32\MSI.DLL"),3)
    wscript.echo installerVer

    If installerVer <> "4.5" Then
        oShell.Run Chr(34) & sExePath & Chr(34) & " " & sSwitches, 1, True
    End If
        
       


    Hibs Ya Bass!

    • Marked as answer by broonster27 Wednesday, May 9, 2012 5:24 AM
    Wednesday, May 9, 2012 5:24 AM