I know exactly how to search the registry for a key with a DisplayName equal to the name of the programs, say “Symantec Endpoint Protection”. But the problem is, I don’t know whether or not the computer this will be running on is 32 bit or 64 bit. Therefore, I need to write it based on 32-bit.
My code works fine if the powershell instance is 64-bit, but it doesn’t work at all if it’s 32 bit and I can’t understand why. I know it’s not because I’m including $key2 in the search path. Are the functions I’m using 64-bit only? If so, do I have an alternative (that’s not WMI)?