TeamViewer doubt - remote control with local PC

Options

Hello everybody, 

I would like to get a connection to a remote PC which is connected to other subnets to work with it. 

The thing goes as follow:

-I have in my local PC some programs that I need to use into the remote PC which,at the same time, is connected to another devices by subnetting to get control of the other devices connected to the remote PC. The thing is I have my own software running in my local PC, but I need to control some devices that are linked with the remote PC which I have remote connection.

So, my question is: could I run my program in my local PC and get a connection to the remote PC and consequently to another devices that the remote PC has connection? and how could I do it?

 

Thanks to all! :)

Best Regards