Hello! Thank you for the script, it works. I searched further and found another way: $detecttv = (Get-CimInstance -ClassName win32_installedwin32program | Select-Object -Property Name, Version | Where-Object {$_.Name -match "TeamViewer*"}) The command take a few seconds, but there is no need to check the system architecture before. With your script it is necessary to check 32-bit or 64-bit and change the regkey path. There is another way to check the installed TeamViewer: Get-CimInstance -ClassName win32_product -filter "Name like 'TeamViewer%'" This works only if the teamviewer was installed through MSI and not EXE. I think i will send TeamViewer a suggestion.
... View more