I recently came across an issue where a MEMCM) Global condition was detecting the Office bitness (architecture), but only to one specific version(example below). This lead to a requirement issue where the computer was running another version of Office that wasn’t covered by the global condition. With that said, we still needed a requirement only for the architecture of Office, while the version was not that important for now.
I’ve uploaded a new script to Technet Gallery that returns the Office Bitness no matter what version is installed (from Office XP to the latest).
In this post, I’ll describe how to use the script with a MEMCM global condition as a requirement for an application.
MEMCM Global Condition Office Bitness Requirement
- Download the Office Bitness detection script from Github
The script is looking at the Bitness registry key of Outlook.
The script will return the value of Bitness. So either x64, x86 or blank if not detected.
To be able to use the script within a MEMCM Global Condition, it must only return this value. If there are additional verbose, like write-host, the Global condition will not work.
MEMCM Global Condition Office Bitness
- Browse to Software Library/Application Management/Global Condition and click Create
- Name: Office Bitness
- Device Type: Windows
- Condition: Settings
- Setting type: Script
- Data type: String
- Click add Script
- Open up the downloaded PowerShell script
- Click Ok. The global condition is ready to be used
Add Global condition to an application
- Edit a Deployment type of application that has the requirement for Office Bitness. On the Requirements tab, select Add.
- Select category Custom, and then select the Office Bitness global condition created earlier.
- As explained earlier, the script returns x64, x86 or nothing.
- Set the equal value you wish to have as a requirement.
That’s it! Now the application will evaluate the Office architecture no matter the version of Office to match the requirement!
For more information on Global conditions, see Microsoft docs.
Hope this help 🙂
Pingback: Detect Office Bitness to use in Intune app requirement - Cloud Clients
Is there simpler way to force unsigned scripts to run? It looks like the GC uses the client settings, which in my case are set to ‘All Signed’.
Thanks for sharing !
Your script was very usefull but in some case, I got exception and bad behaviour.
I figured out that in some situations (uninstalled software), the registry is left in weird state, ie existing HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Office\16.0\Outlook path, but missing value “Bitness”, althought a valid Office 15 version was installed on the computer.
The simple solution was to change lines 28 and 52 from :
$Outlook =get-itemproperty -path $Path -name “Bitness”
$tmp = get-itemproperty -path $Path -name “Bitness” -ErrorAction SilentlyContinue
if ($tmp -ne $null)
$Outlook = $tmp
Hope it can help someone
How about adding Click To Run Bitness check
Thanks for telling us that how we can detect office bitness with memcm global condition.
You forgot to introduce what MEMCM is 😉