salnet Posted August 20, 2012 Share Posted August 20, 2012 Hello folks, I'm scripting a little info-window for my user to easily get some information (logonuser, IP-address, etc.) Now I'd like to extend it a little bit to get the Microsoft Office-version (2003, 2007, 2007) and edition (Pro, Standard, Home and Business, etc). I managed to get the version but I've no clue how to get the edition-information, as it is not stored in the version-infomation of the apps. This is my code: $objWord = ObjCreate("Word.Application") If IsObj($objWord) Then $OfficeVerison = $objWord.Version $objWord.Quit Else $OfficeVerison = "N/A" EndIf Switch $OfficeVerison Case "7.0" $OfficeVerison = "97" Case "8.0" $OfficeVerison = "98" Case "9.0" $OfficeVerison = "2000" Case "10.0" $OfficeVerison = "2002" Case "11.0" $OfficeVerison = "2003" Case "12.0" $OfficeVerison = "2007" Case "14.0" $OfficeVerison = "2010" Case "N/A" $OfficeVerison = "Not installed" Case Else $OfficeVerison = "Older then hell!" EndSwitch $USERNAME=ENVGET("USERNAME") $COMPUTERNAME=ENVGET("COMPUTERNAME") $USERDOMAIN=ENVGET("USERDOMAIN") $LOGONSERVER=ENVGET("LOGONSERVER") MSGBOX(64,"IT-Support information","IT-Support information"&@LF&@LF&"Angemeldeter Benutzer:"&@LF&$USERNAME&@LF&@LF&"Computername:"&@LF&$COMPUTERNAME&@LF&@LF&"Domäne:"&@LF&$USERDOMAIN&@LF&@LF&"Logonserver:"&@LF&$LOGONSERVER&@LF&@LF&"IP-Adresse:"&@LF&@IPADDRESS1&@LF&@LF&"Betriebssystem:"&@LF&@OSVERSION&" "&@OSSERVICEPACK&" "&@OSARCH&@LF&@LF&"Auflösung:"&@LF&@DESKTOPWIDTH&" x "&@DESKTOPHEIGHT&" @ "&@DESKTOPDEPTH&" Bit Farbtiefe"&@LF&@LF&"Microsoft Office Version:"&@LF&$OfficeVerison) Is there anyone who can help me? Link to comment Share on other sites More sharing options...
water Posted August 20, 2012 Share Posted August 20, 2012 $objWord.Version gives more information but I'm not sure this is enough to get the edition you need. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
armoros Posted August 20, 2012 Share Posted August 20, 2012 Hello SalnetMaybe this help you [font="verdana, geneva, sans-serif"] [/font] Link to comment Share on other sites More sharing options...
water Posted August 20, 2012 Share Posted August 20, 2012 If I understand the OP correctly he needs the version/edition of the installed Microsoft Office product not the Microsoft Operating System. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
armoros Posted August 20, 2012 Share Posted August 20, 2012 Yes Water correctly. I thought maybe it could give him some clues. [font="verdana, geneva, sans-serif"] [/font] Link to comment Share on other sites More sharing options...
GEOSoft Posted August 20, 2012 Share Posted August 20, 2012 When I did this a few years back I used similar to what you have and it worked great for the purposes but you may want to take a look at reading the uninstall information as well. I'm not sure if it will be in a consistant key or not though. For mine it is "HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionUninstall{90110409-6000-11D3-8CFE-0150048383C9}" George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
salnet Posted August 20, 2012 Author Share Posted August 20, 2012 water: $objWord.Version won't give the edition of an MS Office Product. armoros: That's an amazing script. I'll have a closer look on it, and I think, I can use it to format my Operating System-details a bit. BUt I see no chance in using it for the office-thing, as the version don't change with an other edition. GEOsoft: sound good, I'll give it a test. Do you know if the GUID is the same at all installations and versions or do I have to test each edition and version? If so, that wouldn't be good, as we have more than 6 different major-versions and hundereds of different patchlevels with an other GUID I think... Thank you guys, I 'll test and will give feedback until end of week. Link to comment Share on other sites More sharing options...
GEOSoft Posted August 21, 2012 Share Posted August 21, 2012 The GUID was the one thing I wasn't sure of but I think it will be the same. Just check it on a couple of machines to see. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" Link to comment Share on other sites More sharing options...
salnet Posted August 21, 2012 Author Share Posted August 21, 2012 I checked the GUID on several machines and it is different on all of them, although they use same OS and same Officeversion, -edition and patchlevel. Link to comment Share on other sites More sharing options...
GEOSoft Posted August 21, 2012 Share Posted August 21, 2012 When I get a chance in the next couple of days I'll find what entry references the GUID and work back from there to find the best starting point. Stay tuned to this station. George Question about decompiling code? Read the decompiling FAQ and don't bother posting the question in the forums.Be sure to read and follow the forum rules. -AKA the AutoIt Reading and Comprehension Skills test.*** The PCRE (Regular Expression) ToolKit for AutoIT - (Updated Oct 20, 2011 ver:3.0.1.13) - Please update your current version before filing any bug reports. The installer now includes both 32 and 64 bit versions. No change in version number. Visit my Blog .. currently not active but it will soon be resplendent with news and views. Also please remove any links you may have to my website. it is soon to be closed and replaced with something else. "Old age and treachery will always overcome youth and skill!" 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