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.
This topic is 5 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
ITEngineer
Posts: 216
Last visit: Thu Mar 23, 2023 5:45 pm
Has voted: 4 times

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: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

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: 216
Last visit: Thu Mar 23, 2023 5:45 pm
Has voted: 4 times

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: 15439
Last visit: Tue Nov 21, 2023 6:37 pm
Answers: 30
Has voted: 4 times
Been upvoted: 33 times

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.
This topic is 5 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked