Assistance - Install for x86 or x64

Hello,

I’m building a C++ redistributable package for deployment. I’ve been looking through the forums here as well as on other resource sites looking for a best practice. This package will be deployed via sccm during OSD. I would like the package to install both x86 and x64 C++ redistributable for x64 clients but only x86 redistributables for x86 clients. Is there a built in test for OS architecture or should I use something else?

Yes, page 34 of the Admin Guide. $Is64bit = Is this a 64-bit OS? (e.g. $true/$false)

Execute-Process -Path “vcredistsetup-x86.exe”
If ($Is64Bit) {
Execute-Process -Path “vcredistsetup-x64.exe”
}