Kaseya Community

Teamviewer ID Procedure

  • HI

    For the life of me i cant find a way to post this in the resources section.

    I created a procedure that will give you the teamviewer id.(works for v6 and 7)

    In order for this to work you will need to create a custom field named "Teamviewer ID"

    To create this field, select Audit -> Machine Summary -> Summary Tab (select any agent) -> New custom Field

    Here's a link to the procedure http://www.fileserve.com/file/rFmdXVP

    Hope this helps someone

  • We were just working on this but for the Mac.  It is failing because for some reason the Id is being written as "0" in the log.  Thanks, we'll see how it works for Windows...

  • Simon,

    This would be very helpful if it works well (haven't tried it yet). However, I'm inclined to think that TeamViewer only writes the registry value for host installations and not their QuickSupport or even full installation. Have you confirmed this?

    I've put together a procedure that will download and launch their Quick Support version and if we could run your procedure afterward that would be fantastic.

    Please update if you resolve the issues you're having.

    Thanks,

    Ryan

  • Hi Ryan,

    Yep I'll report back if we resolve the issue.  TeamViewer are investigating for us.

    Can you upload/paste your Agent Procedure to download and start QS?

    Thanks,

    Simon

  • Hi, Any chance you can paste the text in here - that fileserve thing is showing me ad videos etc.  Thanks, Simon

  • When using quick support or full installation it should write the reg values.That's why the id never changes on a system.On a mac i am not sure(forgot to say that the script is for windows only).

  • <?xml version="1.0" encoding="utf-8"?>

    <ScriptExport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.kaseya.com/vsa/2008/12/Scripting">

      <Procedure name="Teamviewer" treePres="3" id="1223909929" folderId="16167251871564191111371412">

        <Body description="Teamviewer id &#xA;">

          <If description="">

            <Condition name="CheckRegistryValue">

              <Parameter xsi:type="StringParameter" name="RegistryPath" value="HKEY_LOCAL_MACHINE\SOFTWARE\TeamViewer\Version6\ClientID" />

              <Parameter xsi:type="EnumParameter" name="Condition" value="Exists" />

              <Parameter xsi:type="StringParameter" name="Value" value="" />

            </Condition>

            <Then>

              <Statement description="Create a named procedure variable and assign a value retrieved from the managed machine by the agent." name="GetVariable" continueOnFail="false">

                <Parameter xsi:type="EnumParameter" name="VariableType" value="RegistryValue" />

                <Parameter xsi:type="StringParameter" name="SourceContent" value="HKEY_LOCAL_MACHINE\SOFTWARE\TeamViewer\Version6\ClientID" />

                <Parameter xsi:type="StringParameter" name="VariableName" value="ID" />

              </Statement>

              <Statement description="Update the selected System Info field with the specified value for the agent this procedure runs on." name="UpdateSystemInfo" continueOnFail="false">

                <Parameter xsi:type="StringParameter" name="ColumnName" value="Teamviewer ID" />

                <Parameter xsi:type="StringParameter" name="Value" value="#ID#" />

              </Statement>

            </Then>

            <Else>

              <If description="">

                <Condition name="CheckRegistryValue">

                  <Parameter xsi:type="StringParameter" name="RegistryPath" value="HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\TeamViewer\Version6\ClientID" />

                  <Parameter xsi:type="EnumParameter" name="Condition" value="Exists" />

                  <Parameter xsi:type="StringParameter" name="Value" value="" />

                </Condition>

                <Then>

                  <Statement description="Create a named procedure variable and assign a value retrieved from the managed machine by the agent." name="GetVariable" continueOnFail="false">

                    <Parameter xsi:type="EnumParameter" name="VariableType" value="RegistryValue" />

                    <Parameter xsi:type="StringParameter" name="SourceContent" value="HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\TeamViewer\Version6\ClientID" />

                    <Parameter xsi:type="StringParameter" name="VariableName" value="ID" />

                  </Statement>

                  <Statement description="Update the selected System Info field with the specified value for the agent this procedure runs on." name="UpdateSystemInfo" continueOnFail="false">

                    <Parameter xsi:type="StringParameter" name="ColumnName" value="Teamviewer ID" />

                    <Parameter xsi:type="StringParameter" name="Value" value="#ID#" />

                  </Statement>

                </Then>

                <Else>

                  <If description="">

                    <Condition name="CheckRegistryValue">

                      <Parameter xsi:type="StringParameter" name="RegistryPath" value="HKEY_LOCAL_MACHINE\SOFTWARE\TeamViewer\Version7\ClientID" />

                      <Parameter xsi:type="EnumParameter" name="Condition" value="Exists" />

                      <Parameter xsi:type="StringParameter" name="Value" value="" />

                    </Condition>

                    <Then>

                      <Statement description="Create a named procedure variable and assign a value retrieved from the managed machine by the agent." name="GetVariable" continueOnFail="false">

                        <Parameter xsi:type="EnumParameter" name="VariableType" value="RegistryValue" />

                        <Parameter xsi:type="StringParameter" name="SourceContent" value="HKEY_LOCAL_MACHINE\SOFTWARE\TeamViewer\Version7\ClientID" />

                        <Parameter xsi:type="StringParameter" name="VariableName" value="ID" />

                      </Statement>

                      <Statement description="Update the selected System Info field with the specified value for the agent this procedure runs on." name="UpdateSystemInfo" continueOnFail="false">

                        <Parameter xsi:type="StringParameter" name="ColumnName" value="Teamviewer ID" />

                        <Parameter xsi:type="StringParameter" name="Value" value="#ID#" />

                      </Statement>

                    </Then>

                    <Else>

                      <If description="">

                        <Condition name="CheckRegistryValue">

                          <Parameter xsi:type="StringParameter" name="RegistryPath" value="HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\TeamViewer\Version7\ClientID" />

                          <Parameter xsi:type="EnumParameter" name="Condition" value="Exists" />

                          <Parameter xsi:type="StringParameter" name="Value" value="" />

                        </Condition>

                        <Then>

                          <Statement description="Create a named procedure variable and assign a value retrieved from the managed machine by the agent." name="GetVariable" continueOnFail="false">

                            <Parameter xsi:type="EnumParameter" name="VariableType" value="RegistryValue" />

                            <Parameter xsi:type="StringParameter" name="SourceContent" value="HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\TeamViewer\Version7\ClientID" />

                            <Parameter xsi:type="StringParameter" name="VariableName" value="ID" />

                          </Statement>

                          <Statement description="Update the selected System Info field with the specified value for the agent this procedure runs on." name="UpdateSystemInfo" continueOnFail="false">

                            <Parameter xsi:type="StringParameter" name="ColumnName" value="Teamviewer ID" />

                            <Parameter xsi:type="StringParameter" name="Value" value="#ID#" />

                          </Statement>

                        </Then>

                        <Else>

                          <Statement description="Create a named procedure variable and assign a value retrieved from the managed machine by the agent." name="GetVariable" continueOnFail="false">

                            <Parameter xsi:type="EnumParameter" name="VariableType" value="ConstantValue" />

                            <Parameter xsi:type="StringParameter" name="SourceContent" value="None" />

                            <Parameter xsi:type="StringParameter" name="VariableName" value="ID" />

                          </Statement>

                          <Statement description="Update the selected System Info field with the specified value for the agent this procedure runs on." name="UpdateSystemInfo" continueOnFail="false">

                            <Parameter xsi:type="StringParameter" name="ColumnName" value="Teamviewer ID" />

                            <Parameter xsi:type="StringParameter" name="Value" value="#ID#" />

                          </Statement>

                        </Else>

                      </If>

                    </Else>

                  </If>

                </Else>

              </If>

            </Else>

          </If>

        </Body>

      </Procedure>

    </ScriptExport>

  • Sure, here's the procedure to download and run TeamViewer QuickSupport:

     

    <?xml version="1.0" encoding="utf-8"?>

    <ScriptExport xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.kaseya.com/vsa/2008/12/Scripting">

      <Procedure name="Download &amp; Execute TeamViewer QS" treePres="3" id="1724815787" folderId="21372161591394375872261542">

        <Body description="Downloads TeamViewer QuickSupport and executes">

          <Statement description="Get the response from a web page." name="GetURL" continueOnFail="false">

            <Parameter xsi:type="StringParameter" name="URL" value="http://www.teamviewer.com/download/TeamViewerQS_en.exe" />

            <Parameter xsi:type="StringParameter" name="ResponseFileName" value="#vagentconfiguration.agenttempdir#\TeamViewerQS_en.exe" />

            <Parameter xsi:type="BooleanParameter" name="WaitComplete" value="True" />

          </Statement>

          <Statement description="Execute the specified file - full path to file required." name="ExecuteFile" continueOnFail="false">

            <Parameter xsi:type="StringParameter" name="Path" value="#vagentconfiguration.agenttempdir#\TeamViewerQS_en.exe" />

            <Parameter xsi:type="StringParameter" name="Arguments" value="" />

            <Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="User" />

            <Parameter xsi:type="BooleanParameter" name="WaitComplete" value="False" />

          </Statement>

        </Body>

      </Procedure>

    </ScriptExport>

  • Thanks!

  • Until we get the log file scraping working - maybe we could just schedule a screenshot shortly after it starts QS?!

  • Yeah, I was thinking that because we'll need the password too... is that written to registry as well?

  • Busy working on a way to get the pass.

    Either that or to set a default pass on install.

    Will let yo know if i do get that right

  • hello everyone, when I run the script and check the custom field is just reports as NONE - I'm testing on a windows 7  64 bit.

    Any clues

  • This might sound stupid but teamviewer is installed right ?(this works for teamviewer 6 and 7 only)

    Mind checking the following in regedit the following keys for me and see if there is any values in there.

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\TeamViewer\Version6\ClientID

    HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\TeamViewer\Version7\ClientID

    HKEY_LOCAL_MACHINE\SOFTWARE\TeamViewer\Version6\ClientID

    HKEY_LOCAL_MACHINE\SOFTWARE\TeamViewer\Version7\ClientID

  • yeah, those folders are there but nothing in them.

    When I download and run the quicksupport app and then run the other script to get the ID I get nothing.  Any luck getting the ID and Password by other means?