Does anyone know how to get the TeamViewer 7 ID into a Custom Inventory Field so that you can find it and search for it in the Kace system inventory?  I thought I had the solution by creating a custom inventory field by using the following syntax, but nothing seems to work and I get garbage or nothing in the custom inventory field on machines that match the label I'm testing on.  I also tried the "NUMBER" type instead of "TEXT" with no luck.

for 64-bit
RegistryValueReturn(HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\TeamViewer\Version7,ClientID,TEXT)
for 32-bit
RegistryValueReturn(HKEY_LOCAL_MACHINE\SOFTWARE\TeamViewer\Version7,ClientID,TEXT)

I followed this as a guide:

http://www.kace.com/support/resources/kb/article/What-are-the-steps-to-create-a-custom-data-field-Inventory?action=artikel&cat=3&id=522&artlang=en

I may be totally barking up the wrong tree here, but I'm hoping someone can point me in the right direction.  Thank you.

Answer Summary:
Cancel
0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Answers

1

What agent version are you running?

 

I had several custom inventory rules for TeamViewer IDs that stopped working when we updated the KACE Agent to 5.3.47173 All of the returned data turned garbled. I went back and forth with KACE trying to find a solution for about two weeks before they said it was a bug. I was told it was submitted to engineering.

It would be interesting to try your custom rule on an older version of the agent. Mine were working great using 5.1.33668

Answered 06/14/2012 by: Dubnium
Orange Belt

  • Dubnium,

    Thanks for the info, at least I'm not going crazy. Unfortunately, I don't have any older clients installed to test with.

    Were you using the same custom inventory field entries that I posted (with the different path for v5, of course)?
  • We are running Teamviewer v7.0.12979 and Kbox Agent v5.3.47657.
  • I never got around to setting this up for 64bit, but the 32bit matches. I also tried changing the value type to NUMBER, and the service rep for KACE tried lots of variations.

    If you get a solution, please post it!
Please log in to comment
1

Thanks to all that gave great information.  As mentioned in the comments, with Kace v5.4+ this is easy to do:

http://www.kace.com/support/resources/kb/solutiondetail?sol=SOL111924

Answered 04/30/2014 by: badamson
Senior Yellow Belt

Please log in to comment
1

This has been bothering me... but I think I have a workaround.

Create TVID.bat with the following contents.

 

@Echo off
for /f "skip=2 tokens=3" %%A in ('reg query hklm\software\teamviewer\version7 /v clientid') do set /a var=%%A
echo %var%

 

Save this bat file to a network share.

Now create a cutom inventory rule and point it at the share.

ShellCommandTextReturn ("\\Server\Share\TVID.bat")

 

Make sure to specify that this is for a 32bit Windows OS. So far this has worked on XP and 7. If TeamViewer is not installed the field will display an error message instead of the ID.

Answered 06/25/2012 by: Dubnium
Orange Belt

  • Typo, missed a space.

    @Echo off
    for /f "skip=2 tokens=3" %%A in ('reg query hklm\software\teamviewer\version7 /v clientid') do set /a var=%%A

    echo %var%
  • 64bit script.

    @Echo off
    for /f "skip=2 tokens=3" %%A in ('reg query hklm\software\wow6432node\teamviewer\version7 /v clientid') do set /a var=%%A
    echo %var%
    • I was able to combine these scripts to handle both x64 and x86 architectures and return the TV ID using just 1 custom inventory field:
      -----------------------------
      @Echo off

      IF "%PROCESSOR_ARCHITECTURE%"=="AMD64" goto 64BIT

      for /f "skip=2 tokens=3" %%A in ('reg query hklm\software\teamviewer\version7 /v clientid') do set /a var=%%A

      echo %var%

      goto END

      :64BIT

      for /f "skip=2 tokens=3" %%A in ('reg query hklm\software\wow6432node\teamviewer\version7 /v clientid') do set /a var=%%A

      echo %var%

      goto END

      :END
      exit
      -----------------------------
      However, we do have several clients that still have TeamViewer 5 installed. I'm having trouble determining the best way to modify the above script to also check the 'version5' registry key if 'version7' doesn't exist. Any help is greatly appreciated!
  • Thank you for your suggestion! I did exactly this, and it works great.

    Now I'm trying to incorporate the TeamViewer ID returned by the custom inventory rule into a machine action. I know I can launch a TeamViewer session with the machine action "C:\\Program Files (x86)\\TeamViewer\\Version7\\teamviewer.exe" -i --Password . Does anyone know if I can replace the field with the string from the custom inventory rule (similar to how I can do mstsc.exe /v:KACE_HOST_IP)?
  • Kyle, You will be able to do that with the 5.4 release coming soon. You will be able to use any custom inventory field as a variable in machine actions. Machine actions will also be unlimited instead of just 2.
Please log in to comment
Answer this question or Comment on this question for clarity