storme Posted May 31, 2010 Share Posted May 31, 2010 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 Some of my small contributions to AutoIt Browse for Folder Dialog - Automation SysTreeView32 | FileHippo Download and/or retrieve program information | Get installedpath from uninstall key in registry | RoboCopy function John Morrison aka Storm-E Link to comment Share on other sites More sharing options...
BrettF Posted May 31, 2010 Share Posted May 31, 2010 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 Vist my blog!UDFs: Opens The Default Mail Client | _LoginBox | Convert Reg to AU3 | BASS.au3 (BASS.dll) (Includes various BASS Libraries) | MultiLang.au3 (Multi-Language GUIs!)Example Scripts: Computer Info Telnet Server | "Secure" HTTP Server (Based on Manadar's Server)Software: AAMP- Advanced AutoIt Media Player | WorldCam | AYTU - Youtube Uploader Tutorials: Learning to Script with AutoIt V3Projects (Hardware + AutoIt): ArduinoUseful Links: AutoIt 1-2-3 | The AutoIt Downloads Section: | SciTE4AutoIt3 Full Version! Link to comment Share on other sites More sharing options...
storme Posted May 31, 2010 Author Share Posted May 31, 2010 This should get you started. <SNIP> Cheers, Brett I was hoping there was a cleaner solution than that. 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. 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! Some of my small contributions to AutoIt Browse for Folder Dialog - Automation SysTreeView32 | FileHippo Download and/or retrieve program information | Get installedpath from uninstall key in registry | RoboCopy function John Morrison aka Storm-E Link to comment Share on other sites More sharing options...
JFX Posted May 31, 2010 Share Posted May 31, 2010 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 Link to comment Share on other sites More sharing options...
storme Posted June 1, 2010 Author Share Posted June 1, 2010 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. 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 Some of my small contributions to AutoIt Browse for Folder Dialog - Automation SysTreeView32 | FileHippo Download and/or retrieve program information | Get installedpath from uninstall key in registry | RoboCopy function John Morrison aka Storm-E Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now