When I run the command from C:\Windows\SysWOW64\cmd.exe, the results I actually see are from HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall
When I run the command from C:\Windows\system32\cmd.exe, the results I see are from HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall as expected.
The actual problem is that I am testing the script and running it from my PC thinking everything works because when I open up cmd.exe, it opens the one in system32. When the script is run by SCCM, it seems to use the cmd.exe in SysWOW64.
I have read a couple things online, but they did not make sense to me and was hoping someone could expalin to me why I get basically false results when running the reg query on the sysWOW64 cmd.exe
This is happening because ConfigMgr runs processes in 32 bit mode (hence SysWOW64). If you want to get around the redirection, use sysnative instead of system32. This is an old article, but the information is good (EDIT: you don't need the hotfix, this is
for informational purposes only):
Microsoft is conducting an online survey to understand your opinion of the Technet Web site. If you choose to participate, the online survey will be presented to you when you leave the Technet Web site.