Page 1 of 1

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

Posted: Wed Aug 08, 2018 12:34 am
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.

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

Posted: Wed Aug 08, 2018 4:34 am
by jvierra
(Get-ItemProperty HKLM:Software\Classes\Word.Application\CurVer).'(default)'

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

Posted: Wed Aug 08, 2018 3:56 pm
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

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

Posted: Wed Aug 08, 2018 4:38 pm
by jvierra
Yu almost had it. You were only off by one.