How to run a installation file in remote system

how to run the set up file and install in the remote system using telnet ?
what classes are used ?