Using Teamviewer File transfer from an automated script

Hi all,

I have the following scenario and i wonder if it is possible with Teamviewer 11 or later, so that I can suggest it to a client I do consulting for.

They are a maritime company , they have one office and many vessels. If they install TV in every vessel would it be possible to have:

A folder in the Office (UNC path), and a folder (same name UNC path)  in each vessel, and create a script (f.ex by calling TV through command line) that would copy everyhtign that is in the vessel folders to the office folder every few hours, unattended ?

The only example I found so far is to start TV through commadn line, would the data transfer be possible by scriptthat I would call through a win scheduled task every few hours ?

Thanks and best regards,

Alex

Comments

  • This is perhaps possible through the vpn feature. You can start a TV VPN from a script and then do a simple copy from/to a shared folder.
    teamviewer.exe -i <ID> --Password <Password> -m vpn

    Depending on the scripting language (e.g. AutoIt) it would be possible to control the UI of TeamViewer, but i would never recommend this.

    TeamViewer itself doesn't provide this functionality as far as i know.

    »We are all born unique, but most of us will die as a copy.«
  • nf13
    nf13 Posts: 2

    Thanks for your answer, I haven't work with TV vpn before, but it looks like it could be possible judging by this link I found after your suggestion : http://www.smartpctricks.com/2013/05/how-to-setup-configure-free-vpn-virtual-private-network-with-team-viewer-vpn-client-software.html 

    I could theoretically create a shared folder for each ship, create a windows scheduled task  to call a vba script every x hours that will copy from each folder to the local folder in the office.

  • mLipok
    mLipok Posts: 781 ⭐Star⭐

    @elbea64 wrote:

    This is perhaps possible through the vpn feature.


    Certainly Yes. (I was used TV VPN in this way.

    @elbea64 wrote:

    You can start a TV VPN from a script .....
    teamviewer.exe -i <ID> --Password <Password> -m vpn


    Thanks for this example.
    Could you point me to the TV Command Line Reference ?


    @elbea64 wrote:

    Depending on the scripting language (e.g. AutoIt) it would be possible to control the UI of TeamViewer, but i would never recommend this.


    :) I  love AutoIt :)


    @elbea64 wrote:

    TeamViewer itself doesn't provide this functionality as far as i know.


    Unfortunately you are right.
    I asked for this functionality in this thread:

    https://community.teamviewer.com/t5/TeamViewer-11/Embed-TeamViewer-into-Windows-APP/m-p/586

     

     

     

     

     

     

    Regards,
    mLipok , AutoIt MVP
  • elbea64
    elbea64 Posts: 70

    @mLipok wrote:
    Certainly Yes. (I was used TV VPN in this way.

    Can you give an example? This would be the answer to the topic!
    I have no clear idea on how to do this automated, as there is no way to retrieve the IPs used by VPN. In the latest versions the clients get at least always the same IP, so it could be hardcoded for a specific client.

    Thanks for this example.
    Could you point me to the TV Command Line Reference ?

    There is not much Reference


    :) I  love AutoIt :)

    I like it too, but not for gui control in a production environment, as it is impossible to make it foolproof.

     

    »We are all born unique, but most of us will die as a copy.«
  • mLipok
    mLipok Posts: 781 ⭐Star⭐

    @elbea64 wrote:

    I like it too, but not for gui control in a production environment, as it is impossible to make it foolproof.

    I want to ask you: Could you please PM me (here on TVForum) your AutoIt Forum NickName ?

    Regards,
    mLipok , AutoIt MVP
  • mLipok
    mLipok Posts: 781 ⭐Star⭐

    @elbea64 wrote:

    Thanks for this example.
    Could you point me to the TV Command Line Reference ?

    There is not much Reference


     


    Thanks, this is very handful for me.


    @elbea64 wrote:

    @mLipok wrote:
    Certainly Yes. (I was used TV VPN in this way.

    Can you give an example? This would be the answer to the topic!
    I have no clear idea on how to do this automated, as there is no way to retrieve the IPs used by VPN. In the latest versions the clients get at least always the same IP, so it could be hardcoded for a specific client.


    I will try to make some HOW TO, but I'm sure this will not happend in next few days.

     

     

    Regards,
    mLipok , AutoIt MVP
  • mLipok
    mLipok Posts: 781 ⭐Star⭐

    @mLipok wrote:


    @elbea64 wrote:

    @mLipok wrote:
    Certainly Yes. (I was used TV VPN in this way.

    Can you give an example? This would be the answer to the topic!
    I have no clear idea on how to do this automated, as there is no way to retrieve the IPs used by VPN. In the latest versions the clients get at least always the same IP, so it could be hardcoded for a specific client.


    I will try to make some HOW TO, but I'm sure this will not happend in next few days.


    I have no time to make full HOW TO guide.
    But I just make some little help.
    I hope this is sufficient that you could do appropriate HOW TO.

    VPN_HowTo_1.png

    Regards,
    mLipok , AutoIt MVP
  • elbea64
    elbea64 Posts: 70

    Subject:
    Using Teamviewer File transfer from an automated script
    @mLipok wrote:
    Certainly Yes. (I was used TV VPN in this way.

    This doesn't look very automated or do i miss something?

    and i was never active on the official AutoIt forum.

    »We are all born unique, but most of us will die as a copy.«
  • mLipok
    mLipok Posts: 781 ⭐Star⭐

    @elbea64 wrote:

    Subject:
    Using Teamviewer File transfer from an automated script
    @mLipok wrote:
    Certainly Yes. (I was used TV VPN in this way.

    This doesn't look very automated or do i miss something?


    I was using simple xcopy bat files.
    But currently after when you give me a link to CMD parameters for TV I'm thinking about automating with AutoIt.

    Btw.
    Full automatization would be possible only if TV would have in the future an ActivX interface, to start, stop, check, connections.
    I already open such thread in IDEAS (feel free to pusch KUDO button).

    Regards,
    mLipok , AutoIt MVP
  • elbea64
    elbea64 Posts: 70

    If it's true that with the latest TV versions clients and hosts get always the same ip it should be possible to do file transfers fully automated.
    You need a list with TV IDs and the corresponding IPs. Now you can make the connection to the ID and then do the file transfer using the IP.
    The problem i see is how to disconnect from the partner. It would be possible by restarting the TV service, even so this is not nice.

    The only not automated process is to create the list of TV IDs and IPs, but this only one time.

    »We are all born unique, but most of us will die as a copy.«
  • mLipok
    mLipok Posts: 781 ⭐Star⭐

    Now I think we can use FTP via TV VPN.
    Just like here:
    https://community.teamviewer.com/t5/Ideas/Idea-Teamviewer-FTP-Server/m-p/3439


    But the problem is how to start TV VPN and get remote IP ?
    This is exactly what I was asking here:
    https://community.teamviewer.com/t5/Ideas/TeamVierwer-CMD-connection-result/m-p/2400

    And of course this following ideas is also very important:
    https://community.teamviewer.com/t5/Ideas/TeamVierwer-CMD-connection-to-the-TVHost-with-EasyAccess-without/m-p/2401

     

    Regards,
    mLipok , AutoIt MVP
  • Once TV vpn has established the vpn, you don't use TV file transfer.  You use CIFS, FTP, or whatever.  VPN exposes the networks to each other.  Therefore, if your server has an internal network, say, 192.168.1.1 subnet, and an IP of 192.168.1.35 as an IP address, then you establish the the vpn, then do a NET USE command to connect to 192.168.1.35 and copy the files.  Example.

    Let's say that the server has a Windows computer name of "SERVER1" on 192.168.1.25.  It has a share name of "ShipUploads".  

    NET USE n:   \\SERVER1\ShipUploads   /user:<username>   <password>
    COPY "C:\source_files\*.*"   "n:\<target dir>" /f 
    net use n: /d