Jump to content

Recommended Posts

Posted

I'm writing a little update script so I can install office (mainly 2007) from a customers CD (could be OLD sp0 or new sp2) then apply pre downloaded updates (SP2, etc) to bring it up to the latest version.

What I need is something like @OSServicePack.

Anyone have any ideas and/or can point me in the right direction.

Thanks for any help you can offer.

John Morrison

aka

Storm-E

Posted

This should get you started.

#include "CompInfo.au3"
Dim $Software

_ComputerGetSoftware($Software)
If @error Then
    $error = @error
    $extended = @extended
    Switch $extended
        Case 1
            MsgBox (0, "", "Array contains no data.")
    EndSwitch
EndIf

For $i = 1 To $Software[0][0] Step 1
    MsgBox(0, "_ComputerGetSoftware", "Name: " & $Software[$i][0] & @CRLF & _
            "Version: " & $Software[$i][1] & @CRLF & _
            "Publisher: " & $Software[$i][2] & @CRLF & _
            "Uninstall Path: " & $Software[$i][3])
Next

http://www.autoitscript.com/forum/index.php?showtopic=29404

Cheers,

Brett

Posted

This should get you started.

<SNIP>

Cheers,

Brett

I was hoping there was a cleaner solution than that. :mellow:

My Version is

Version: 12.0.6425.1000

According to some research I've done

Original: 12.0.4518.1014

SP1: 12.0.6213.1000

SP2: 12.0.6423.1000

So it looks like mine is above SP2.

So I'll have to hard code the version numbers into my script. :P I was hoping to avoid that.

M$ get it from somewhere because this is what comes up in the about box

"Microsoft Office Outlook 2007 (12.0.6504.5000) SP2 MSO (12.0.6425.1000)"

Notice the SP2.........

Thanks for the help Brett!

Posted

This should actually work

For $i= 1 to 100
    $var = RegEnumKey('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\Registration', $i)
    If @error <> 0 then ExitLoop
    $SP = RegRead('HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Office\12.0\Registration\' & $var, 'SPLevel')
    IF Not @error Then
        MsgBox(0,"Office 2007 Service Pack", $SP)
        ExitLoop
    EndIf
Next

THANKS JFX

That is exactly what I was looking for. :mellow:

AND so simple. I'd already started writting a verison compare using Bretts' code but it wouldn't have been as elegant as this. :-)

Thanks

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...