Jump to content

Get Microsoft Office Version and Edition Information


 Share

Recommended Posts

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

$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 - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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 - Wiki
ExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example Scripts
OutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - Download
Outlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - Wiki
PowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - Wiki
Task Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki

Standard UDFs:
Excel - Example Scripts - Wiki
Word - Wiki

Tutorials:
ADO - Wiki
WebDriver - Wiki

 

Link to comment
Share on other sites

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

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

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

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

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
 Share

  • Recently Browsing   0 members

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