Sign in to follow this  
Followers 0
salnet

Get Microsoft Office Version and Edition Information

10 posts in this topic

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?

Share this post


Link to post
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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Hello Salnet

Maybe this help you


[font="verdana, geneva, sans-serif"] [/font]

Share this post


Link to post
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 2017-04-18 - Version 1.4.8.0) - Download - General Help & Support - Example Scripts - Wiki
OutlookEX (NEW 2017-02-27 - Version 1.3.1.0) - Download - General Help & Support - Example Scripts - Wiki
ExcelChart (2015-04-01 - Version 0.4.0.0) - Download - General Help & Support - Example Scripts
Excel - Example Scripts - Wiki
Word - Wiki
PowerPoint (2015-06-06 - Version 0.0.5.0) - Download - General Help & Support

Tutorials:
ADO - Wiki

 

Share this post


Link to post
Share on other sites

Yes Water correctly.

I thought maybe it could give him some clues.


[font="verdana, geneva, sans-serif"] [/font]

Share this post


Link to post
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!"

Share this post


Link to post
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.

Share this post


Link to post
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!"

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
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!"

Share this post


Link to post
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
Sign in to follow this  
Followers 0