→ 🚀What's New? Join Us for the Fall Product Launch! Register Now !
‎01-03-2018 11:25 PM
‎01-06-2020 10:07 PM
‎01-08-2020 03:06 PM
Mikey! wrote:
Has this been added yet? Last message was about a year ago. It would be great to differentiate x32 and x64 bit office installs when you are trying to convert any x32 bit installs to x64 bit...
Thanks!
Mike
#Variables
#First two are for creation of future registry key. The rest should be appropriate key value locations you need to query.
$officeVersion = notScanned
$pathToWriteTo = "hklm:\whatever\you\want\to\query\later\on"
$office2010x86 = test-path "hklm:whatever\the\local\of\the\value\is"
$office2010x64 = test-path "hklm:whatever\the\local\of\the\value\is"
$office2013x86 = test-path "hklm:whatever\the\local\of\the\value\is"
$office2013x64 = test-path "hklm:whatever\the\local\of\the\value\is"
$office2016x86 = test-path "hklm:whatever\the\local\of\the\value\is"
$office2016x64 = test-path "hklm:whatever\the\local\of\the\value\is"
#Go through each. I only did the first three. Off the top of my head I'd say in reverse order so that if you have upgraded over time and multiple keys exist that it just pulls
#the most recent key and then stops
If ( $office2016x64 -eq $True ) {
$officeVersion = "Office 2016 x64"
New-Item -Path $pathToWriteTo -Name OfficeVersion -Value $officeVersion
} ElseIf ( $office2016x86 -eq $True ) {
$officeVersion = "Office 2016 x86"
New-Item -Path $pathToWriteTo -Name OfficeVersion -Value $officeVersion
} ElseIf ( $office2013x64 -eq $True ) {
$officeVersion = "Office 2013 x64"
New-Item -Path $pathToWriteTo -Name OfficeVersion -Value $officeVersion
} Else {
exit
}
‎12-04-2018 02:04 PM
‎12-04-2018 01:25 PM
‎04-23-2018 07:48 PM
‎01-04-2018 11:23 PM
‎01-04-2018 11:48 AM
Where tblSoftwareUni.softwareName Like '%Microsoft%x64%'
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now