How to get the value of currently installed MS Word version using PowerShell?

Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
Locked
User avatar
ITEngineer
Posts: 193
Joined: Wed Oct 12, 2011 10:52 am

How to get the value of currently installed MS Word version using PowerShell?

Post by ITEngineer »

Hi People,

I tried to get the value of the registry entry Computer\HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Word.Application\CurVer (Default) with this command:

Code: Select all

Get-ItemProperty -Path 'HKLM:Software\Classes\Word.Application\CurVer'.(default)
But not sure how to get the returned value?
(default) : Word.Application.16
PSPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\Software\Classes\Word.Application\CurVer
PSParentPath : Microsoft.PowerShell.Core\Registry::HKEY_LOCAL_MACHINE\Software\Classes\Word.Application
PSChildName : CurVer
PSDrive : HKLM
PSProvider : Microsoft.PowerShell.Core\Registry
How to correct my Powershell script above?

Thanks in advance.
/* IT Engineer */

jvierra
Posts: 14456
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: How to get the value of currently installed MS Word version using PowerShell?

Post by jvierra »

(Get-ItemProperty HKLM:Software\Classes\Word.Application\CurVer).'(default)'

User avatar
ITEngineer
Posts: 193
Joined: Wed Oct 12, 2011 10:52 am

Re: How to get the value of currently installed MS Word version using PowerShell?

Post by ITEngineer »

jvierra wrote:
Wed Aug 08, 2018 4:34 am
(Get-ItemProperty HKLM:Software\Classes\Word.Application\CurVer).'(default)'
Cool, many thanks for the assistance in this matter Mr. Vierra. :D
/* IT Engineer */

jvierra
Posts: 14456
Joined: Tue May 22, 2007 9:57 am
Contact:

Re: How to get the value of currently installed MS Word version using PowerShell?

Post by jvierra »

Yu almost had it. You were only off by one.

Locked