How to Automate the application which is accesible through remote desktop - automation

I have a requirement to automate one of my application which is accessible only through Remote desktop connection.
I normally connect to the application using following steps
1) Navigate to remote desktop connection and enter Ip address
2) Enter Server User id ,password
3) Then open application using browser.
Please help with the steps.

You can break your problems in 2steps :
1. Login to the box via java code (or any other preferable language, you are comfortable).
Remote Desktop Connection
JAVA
// creating credentials
Process p = Runtime.getRuntime().exec("cmdkey /generic:"+ip+" /user:"+userName+" /pass:"+password );
p.destroy();
Runtime.getRuntime().exec("mstsc /v: "+ip+" /f /console");
Thread.sleep(2*60*1000); // min sec millisec
// deleting credentials
Process p1 = Runtime.getRuntime().exec("cmdkey /delete:"+ip);
p1.destroy();
Once you able to login to the box, it is as simple as launching the browser, opening the application and running your scripts(these scripts should be present on your remote desktop where you want to run your scripts). This is pretty straight forward.

Related

SSH session within SSH session - VS Code

I connect to a server within Visual Studio Code using SSH ("Remote-SSH: Connect to Host..."). When working in the terminal within VS Code, the command code <file> results in opening the file in VS Code of the client (therefore on my screen). Now let's suppose I establish another SSH connection from the current session to a workstation within the network of the server using ssh <some workstation>. When I now try to open a file in VS Code using code <file>, nothing happens.
My questions are:
Since the last code <file> mentioned didn't open anything on my screen, is it possible that VS Code did open on any other screen connected to either the server or the workstation?
Is there any possibility to open the file within my VS Code?
As for your first question:
There's is NO WAY your action could have opened a window on any other screen than yours. For that to happen you'd have to "link" your ssh session to that screen, which would require a bunch of intermediary steps.
Now for the second question:
Yes its possible (and pretty easy). BUT you will have to open another session of VScode that will connect to the "workstation" through the server.
Currently, to connect to the server, you probably had to add these lines to your ssh config file:
Host MyServer
HostName adress.server
User username
To open a session in the workstation, through the server, you should add these lines:
Host MyWorkstation
HostName workstation.adress.within.network.of.the.server
User usernameInWorkstation
ProxyJump server.adress

Can not complete Pepper robot factory reset

My Pepper went nuts. I am trying to do factory reset to my Pepper robot via Settings menu. It asks for username and password. If i insert them then it says
No response from the server or unknown error
When i insert wrong password it says wrong password so that means it gets connection.
For another Pepper robot this function works good. Is there another way to do factory reset to Pepper?I saw there is void function in ALSystem that does it but it seems very risky to me.
Are you sure your robot is connected to the Internet (using wifi or ethernet)?
If you have the image downloaded (.opn) on your computer, you can use Choregraphe to flash the robot without requiring any internet connection (see "connection" menu > advanced > update robot system)
If you are familiar with command lines:
1) upload the image to the robot using scp scp the-file.opn nao#ip-of-your-robot:./update.opn or filezilla (host: ip address of the robot, user: nao, password: only you know it!, port 22).
2) connect using ssh to the robot (putty on windows) and type: nao-autoflash --erase-user-data ./update.opn.
3) restart the robot.
You can also use choregraphe.
Connect with your robot on choregraphe.
click on connection -> advanced -> update robot system
follow the instruction (enter robot password,browse the opn file)
after you will see this window :
click on yes I want to apply a factory reset...
and you will complete your factory reset.

xrdp_mm_process_login_response: login failed

HI I was trying to login remotely in the computer hosted by amazon services. It's ubuntu 64 bit machine.
In the beginning I was able to login into the computer with both client , remote desktop connection (RDP) keeping the default port (-1) and for the command line I am using putty session to access the computer. But after we made some changes and create new images of computer state. But When I try to login again it gives me the error xrdp_mm_process_login_response: login failed.
So I was wondering is that related with the port number ? or some image creation issue.
I will look forward to hear from you.
Thanks
Yash
I have run into the same issue. The solution to me is just to create new user for xrdp. While user "ubuntu" worked on original instance. After launching a new instance using a snapshot of the original instance, "ubuntu" login didn't work anymore. Then, after creating a new user, I could login with the new user onto xrdp.

clickonce update, avoid change to installed program config file

I store connection string and other settings in application.setting(config)
also deployed c# app with click once and published it on the web server to be accesible for my clients easily.
but the problem is when the user install app from web server and set its customized settings on application then, each time I publish new version of my app ,when client update the app from web server then its current application setting will be replaced by file that I published on server so connection string of application on my system will set for the client in consequence client app could not connect to his db because of connection string changes pls let me know if there is a solution to avoid updating setting by click once?
It's not safe to store your data in the ClickOnce cache. Check out this article, which explains how to move it to LocalApplicationData so it is unchanged by updates.

Remotely control a graphical vb.net program through a command prompt

I have created a VB.NET program using windows forms. The program runs on a remote PC and displays information on a screen. The computer does not even have a mouse or keyboard connected to it. The program shows the information based on the file that is loaded.
I want to be able to change this file remotely to another file that is already on the remote PC. I can't use a graphical remote desktop client as we have very limited bandwidth.
So, my idea is to change the file using the command prompt (I think I'll need something like SSH). I'm not sure how to do this. Should I use something like this and load DosModule first:
Module DOSModule
Public Sub Main()
Console.Write("First, start with Command Prompt processing ...")
Dim myWinForm As New WinForm
Application.Run(myWinForm)
End Sub
End Module
How would I then read commands that is send to the program? I also only want one instance of the program running.
Thanks
You have 2 options. The first is a custom program that WILL require some network programming, like it or not. I would suggest creating either a Command-Line batch file or else a PowerShell script, then creating a program to transfer the script to the remote computer and execute the script.
The second option and the one better suited for you would be to download an SSH server. An SSH server will essentially open a command window and pipe the input and output over to a telnet client running on your machine. If you are running a version of Windows Server, an SSH server comes with Windows Server. Otherwise, you can download one for free here: http://www.freesshd.com/
Once you install the SSH server, you simply use telnet, from a command prompt, to link up with your remote SSH server