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?
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 
">
<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#" />
</Then>
<Else>
<Parameter xsi:type="StringParameter" name="RegistryPath" value="HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\TeamViewer\Version6\ClientID" />
<Parameter xsi:type="StringParameter" name="SourceContent" value="HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\TeamViewer\Version6\ClientID" />
<Parameter xsi:type="StringParameter" name="RegistryPath" value="HKEY_LOCAL_MACHINE\SOFTWARE\TeamViewer\Version7\ClientID" />
<Parameter xsi:type="StringParameter" name="SourceContent" value="HKEY_LOCAL_MACHINE\SOFTWARE\TeamViewer\Version7\ClientID" />
<Parameter xsi:type="StringParameter" name="RegistryPath" value="HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\TeamViewer\Version7\ClientID" />
<Parameter xsi:type="StringParameter" name="SourceContent" value="HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\TeamViewer\Version7\ClientID" />
<Parameter xsi:type="EnumParameter" name="VariableType" value="ConstantValue" />
<Parameter xsi:type="StringParameter" name="SourceContent" value="None" />
</Else>
</If>
</Body>
</Procedure>
</ScriptExport>
Sure, here's the procedure to download and run TeamViewer QuickSupport:
<Procedure name="Download & 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 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" />
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?
So until someone figures out how to get the password sucked up into the VSA or even better an email sent to the technician with the ID and Password.
I have put the following together, works OK for me but sometimes I don't get the image uploaded. Script should be attached.
Takes the initial script and downloads the TeamViewer app, runs it, takes a silent snapshot, uploads and finally send the tech a message with instructions on how to get the jpg. If that does not work gets the GUID of the agent and inserts the shortcut for the tech to use a browser to take an instant snapshot to see the ID and Password on the users screen.
I find the pop up menu the easiest to run the script and get quick access to the jpg, see pics below.
In the procedure you need add the web address of your VSA, hopefully its useful until someone gets the password thing working. If anyone knows how to embed the jpg into the email that would be excellent.
Thanks, NIKNAKS - good job!
great procedures !
but Quick Support does not seem to create a registry entry on my clients, am i missing something here?
thanks!
Hans den Boer
NC Automatisering
yeah, this did this to me as well - It started to work but not sure how.
Possibly because the machine i was using to test I also installed the normal teamviewer initiater software.
anyone know how to get the jpeg embedded into the email that gets sent to the tech?
Hi all,
We've extended the agent procedure infonoob posted; now it scrapes the Teamviewer 7 ID from the plist file on Mac OS X .
Brad
<ScriptExport xmlns:xsi="www.w3.org/.../XMLSchema-instance" xmlns:xsd="www.w3.org/.../XMLSchema" xmlns="www.kaseya.com/.../Scripting">
<Procedure name="Teamviewer ID" treePres="3" id="1138394092" folderId="77131551412219687239942232">
<Body description="Teamviewer ID extraction - Windows with TV6&7, Mac with 7
">
<Statement description="Create a named procedure variable and assign a value retrieved from the managed machine by the agent." name="GetVariable" continueOnFail="false" osType="Windows">
<Statement description="Update the selected System Info field with the specified value for the agent this procedure runs on." name="UpdateSystemInfo" continueOnFail="false" osType="Windows">
<Parameter xsi:type="StringParameter" name="ColumnName" value="TeamViewerID" />
<Statement description="Execute the given command as if it were typed in at a command prompt." name="ExecuteShellCommand" continueOnFail="false" osType="MacOS">
<Parameter xsi:type="StringParameter" name="Command" value="plutil -convert xml1 /Users/*/Library/Preferences/com.TeamViewer7.Settings.Machine.plist" />
<Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="System" />
<Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False" />
<Statement description="Execute the given command as if it were typed in at a command prompt." name="ExecuteShellCommand" continueOnFail="true" osType="MacOS">
<Parameter xsi:type="StringParameter" name="Command" value="awk '/ClientID/{getline; print}' /Users/*/Library/Preferences/com.TeamViewer7.Settings.Machine.plist | cut -c 11-19 >> tvid.txt" />
<Statement description="Create a named procedure variable and assign a value retrieved from the managed machine by the agent." name="GetVariable" continueOnFail="false" osType="MacOS">
<Parameter xsi:type="EnumParameter" name="VariableType" value="FileContent" />
<Parameter xsi:type="StringParameter" name="SourceContent" value="tvid.txt" />
<Statement description="Write an Entry into the Procedure Log" name="WriteScriptLogEntry" continueOnFail="false" osType="MacOS">
<Parameter xsi:type="StringParameter" name="Comment" value="TVID: #ID#" />
<Statement description="Update the selected System Info field with the specified value for the agent this procedure runs on." name="UpdateSystemInfo" continueOnFail="false" osType="MacOS">
^ This is fantastic
We just implemented this- now we're working on making the whole process of connecting to teamviewer seamless.
So far, i've developed a script (and accompanied zip file with an msi) that will silently install and run teamviewer, pull the ID (using the above script), and then save the ID into the system info.
What we need now is to know how Kaseya passes commands to the local computer- the technician's machine, to run VNC and such. We can mimic this (i assume) in that column we've created for TeamViewer ID to actually turn that ID into a link that will pass the following command to the machine:
C:\Program Files\TeamViewer\Version7\teamviewer.exe -i 123456789 --Password test
(taken from: www.teamviewer.com/.../91-Are-there-parameters-to-start-TeamViewer.aspx)
Any idea how to do that?
Hmmm BradL i had some trouble importing your script =/
This is the final version of our script- it uses the TeamviewerID script mentioned above (it has the same ID & folder ID) so you may have to delete it if you already have it.
It will do the following:
<?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 Install and Get ID" treePres="3" id="1086173934" folderId="78119117751191949634245793"> <Body description="This procedure will Instal TV silently from COMPANYSITE and then get the ID"> <Statement description="Get the response from a web page." name="GetURL" continueOnFail="false"> <Parameter xsi:type="StringParameter" name="URL" value=" COMPANYSITE/tv_files/host/TV_General_Support.zip" /> <Parameter xsi:type="StringParameter" name="ResponseFileName" value="#vagentconfiguration.agenttempdir#\TV_General_Support.zip" /> <Parameter xsi:type="BooleanParameter" name="WaitComplete" value="True" /> </Statement> <Statement description="Unzips a file (Windows, OS X, Linux)" name="Unzip file" continueOnFail="false"> <Parameter xsi:type="StringParameter" name="Parameter1" value="#vagentconfiguration.agenttempdir#\TV_General_Support.zip" /> <Parameter xsi:type="StringParameter" name="Parameter2" value="#vagentconfiguration.agenttempdir#\TV_General_Support\" /> <Parameter xsi:type="StringParameter" name="Parameter3" value="True" /> </Statement> <Statement description="Install MSI" name="Install MSI" continueOnFail="false"> <Parameter xsi:type="StringParameter" name="Parameter1" value="C:\ktemp\TV_General_Support\Setup.msi" /> <Parameter xsi:type="StringParameter" name="Parameter2" value="True" /> <Parameter xsi:type="StringParameter" name="Parameter3" value="True" /> </Statement> <Statement description="Delete the specified file - full path to the filename required." name="DeleteFile" continueOnFail="false"> <Parameter xsi:type="StringParameter" name="Path" value="C:\Users\Public\Desktop\Teamviewer 7 Host.lnk" /> </Statement> <Statement description="Set the login credentials to execute a file or shell command as this user - Windows 2000 and above only." name="ImpersonateUser" continueOnFail="false"> <Parameter xsi:type="StringParameter" name="UserName" value="ADMIN ACCOUNT" /> <Parameter xsi:type="StringParameter" name="Password" value="PASSWORD" /> <Parameter xsi:type="StringParameter" name="Domain" value="" /> </Statement> <Statement description="Execute the specified file - full path to file required." name="ExecuteFile" continueOnFail="false"> <Parameter xsi:type="StringParameter" name="Path" value="c:\program files (x86)\teamviewer\version7\teamviewer.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> <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>
For this script, I highly recommend having a custom host file that you use, with a preconfigured REG file that the MSI will import. You may want to use the following switch in your REG as well:
Under: HKEY_LOCAL_MACHINE\SOFTWARE\TeamViewer\Version7\DefaultSettings
Create this line: "HostInfoDialog"=dword:00000000
This will remove that box that pops up and asks you to click 'ok' and 'never show this again'
I had some trouble importing BradL's script as well, which is unfortunate because it's exactly what we're looking for! When I try to import it I get an error message stating:
■The text you are trying to import is ot a valid XML or ASP import format.
■An error occurred while parsing EntityName. Line 7, position 67.
Any chance you could attach a direct export file of your procedure?