If you are using Impero Connecet to remotely connect to endpoints and want to automate a predefined file transfer job, you can do this by using the Guest scripting feature. A standard Guest script provides this feature for a predefined set of endpoints.
You can add more flexibility to the standard script and be able to create ad hoc connections to various endpoint Hosts and perform a predefined file transfer job. In this example a file transfer operation is described, but it might as well be another type of session e.g. run a program or script on the remote Host computer.
The attached package consists of three files. All to be used on the Windows Guest computer:
- Adhocft.template - holds the information used for the final temporary ad hoc script adhocft.dws;
- Getfile.cmd - the script to be launched to initialize the session;
- Sed-4.2.1-setup.exe – script application to be installed on the Guest computer – needed for the processing;
Here is what to do:
- Extract the zip file to a suitable folder of your choice on the Guest computer;
- Edit the adhocft.template to match your file transfer requirements.
The predefined parameters in this template are the communication profile to use (in this case TCP/IP), the copy-from path file on the Host and copy-to path on the Guest. The login credentials for the Host connection can be defined too, but this has to be done from within the Guest in order to have the password encrypted. The adhocft.template also holds the information related to reactions to events;
- Run the sed setup executable to install it;
- Launch the getfile command script. It prompts you for Host ID - type IP address or DNS name. It then injects this into a temporary Guest script (adhocft.dws), which launches the Guest;
- The Guest should connect to the Host, prompt you for credentials (if not predefined) and then perform the file transfer;
The script will prompt the user for a Host IP address and then inject that into a new dws file which is used to launch the Guest and process the file transfer.
The sample scripts and tools provided here are not supported under any Impero standard support program or service. All scripts are provided as is without warranty of any kind. Any risk arising by the use or performance of the sample scripts, tools and documentation remains with you. In no event shall Impero, its authors, or anyone else involved in the creation, production, or delivery of the scripts and tools be liable for any damages whatsoever.