How can I emulate pressing CTRL+ALT+PAUSE in my Linux VM using AutoKey? - virtual-machine

Question:
How can I emulate pressing CTRL+ALT+PAUSE in my Linux VM using AutoKey?
I tried a script that has
keyboard.send_keys("<ctrl>+<alt>+<pause>")
in it. But it does not work.
Background:
I'm using Windows 10 and RDP to log into a Fedora Linux. Switching 100 times a day.
The RDP connection runs in Windows all the time.
If the RDP window is not in the background but active, I can press CTRL+ALT+PAUSE to go into the VM (Fullscreen). If I am inside the VM I can press CTRL+ALT+PAUSE to go back to Windows.
So far so good. I want only one button. Preferably PAUSE. Windows part is ready already with following script
Pause::
If !WinExist("RDP Tool Name")
MsgBox No Window found
WinShow, RDP Tool Name
WinActivate, RDP Tool Name
Send ^!{CtrlBreak}
Return
Is the Linux part maybe not possible because the key combination is cached somewhere before my Linux system can even notice it? Any ideas?

I solved it without any other new script. I just had to edit the RDP settings: Keyboard -> Use Windows-Hotkeys -> On this Computer

Related

regain access to centos7 after modify rc.local

I have a centos 7 on a vm. I put some command lines on the rc.local to initialize always the system reboot. I think i did something wrong, because when i restart the system, it frozes and dont enter centos anymore.
The internet is not on, i have to manually connect it when the centos starts, so i can't login the machine through Putty or other ssh program in order to fix the rc.local
What should i do now?
I found out the answer in this video:
www.youtube.com/watch?v=rvPtrwidhwo
When your linux appears to load completely (but get stuck) press "esc" to see where in the list of processes it got stuck.
Restart the virtual machine, and by the time it enters the mode to choose with linux you will want to load (rescue mode or normal mode), press ctrl+e to enter on a configuration/modification screen. It will show commands in the prompt.
You have to add parameters shown on the video. Search for the work "quiet". After this word and before the word LANG, add "systemd.unit=rescue.target"
Press ctrl+x to save (it will restart the vm automatic).
You will enter the rescue mode, input the root password.
Disable or modify the rc.local on (vi /etc/rc.local) in order to regain control over linux.
Then type: shutdown -r.
Restart the vm and everything will work again.

Is it possible to run UFT scripts on virtual machines?

I am writing scripts which will install UFT and do all the configuration setting require to run the UFT scripts. My UFT scripts are browsing some urls etc.
I want to know if I do it in Virutal Machines then is it possible to run the UFT scripts on those servers as they won't have mouse and keyboards attached.
Want to run automatically on machines without logging into the machines.
In case if you are simulating mouse & keyboard actions (like hitting ENTER, Clicking on particular coordinate etc) in your script, It will work fine even if mouse and keyboards are not connected to a computer. Basically you are simulating mouse and keyboard clicks w/o actually using them.I assume you have verified your scripts in your local machine. If it works fine, Then it will also work fine in your VM.(assuming your VM has enough permissions/all the prerequisites installed/configured etc).
It works. I use it every day. You can even use analog recording in the VM with a Remote Connection to the VM with no problems as well.

telnet windows 7 not working

I have a Windows 7 computer, and I'm trying to work with telnet.
I installed/enabled telnet (via control panel, since telnet isn't enabled by default), restarted the terminal, restarted my computer, etc.
But telnet still doesn't work. I'm getting the error : 'telnet' is not recognized as an internal or external command...
I tried editing the PATH environment variable as well, but that hasn't worked either.
I would greatly appreciate any advice.
Thank you very much!
Looks like your telnet is not installed. Simply execute the below command in your command prompt and wait till the mouse progress icon disappears. It works on windows 7. I am not sure on other machines
pkgmgr /iu:"TelnetClient"
I was having the same issue. Fixed it by running CMD as an admin.
If your Windows 7 machine is a member of an AD, or if you have UAC enabled, or both, telnet must be run as an admin. The easiest way to do this is to create a shortcut that calls cdm, and then go to the shortcut's properties and click on the Advanced button and check the "Run as an administrator" checkbox, and you're all set. Scratched my head and rebooted numerous times before finding this out...

Windows 7 Ent login loop

I have a Windows 7 Ent - 64bit system.
I am stuck in a loop, where the login screen is presented, i enter my network credentials, the welcome spinner is shown, the screen flickers like when resized, then the system goes to logging off screen and then finally goes back to the control alt delete screen.
I cannot get out of that loop for the life of me.
I contacted corp support, he came over and logged in using his login (admin level) and was able to get a desktop up.
The support people are not allowed to access the registry to correct or even look at my users settings, and my user IS NOT AN ADMIN on this machine.
Question is - is there a way to blow away my profile on this machine, or reset my registry branch to that of a new user or something???
i have bitlocker enabled on the drive - so using the emergency boot disks are almost rendered useless...
im stuck, and i dont know where to look....
any ideas would be wonderful
thanks
the admin level user logged in, and turned his back for a moment, and i was able to go in and reset the autologon registry entry...
rebooted,and all is well.
Disconnect Your USB Devices
If you like using all sorts of USB devices such as the mouse, keyboard, speakers, Bluetooth speakers, USB dongles, USB Wi-Fi adapters etc. However, these connected devices might cause the Windows 7 stuck on the welcome screen for a long time issue. Therefore, a common solution to the problem is to disconnect all externally connected devices from your PC.
Disconnect from the Internet
Sometimes Windows 10 gets stuck on the login screen because it's trying to connect to your wireless connection. If your Windows gets stuck on the welcome screen, you should make sure that you are not connected to the internet before proceeding to log in.
Run system checks
In some case, corrupt system files on your computer will cause this problem – stuck on welcome screen Windows 10/8/7. Therefore, to fix the Windows 10 freezes on startup problem, you can use CHKDSK to run some checks on your computer to see if it is the corrupted files that cause your startup problem.Restart Windows Update service
You can try restarting Windows Update service and then rename few files if you still get stuck on welcome screen Windows 10 issue.
Here are the steps:
Step 1. Open command prompt.
Step 2. Type net stop wuauserv in the run dialogue and press Enter.
Step 3. Type cd %systemroot% command and press Enter.
Step 4. Type ren SoftwareDistribution SD.old and press Enter.
Step 5. Type net start wuauserv and press Enter.
Step 6. Type exit and press Enter to close Command Prompt and restart your PC.
Step 7. Now, reboot your PC/laptop and check if the stuck on welcome screen has gone.
Restore Windows by using System Restore
System Restore is a useful feature that allows you to restore your operating system to a previous state and fixes any boot problems such as Windows 10 freezes on startup, Windows 7 hangs on welcome screen, etc.

can we execute QTP script on remote machine by keeping session minimized

I have couple of machines on which I wish to schedule exceutions. I need to access these machines remotely for exceution. Whenever I start exceution from these machines and minimize the session my script fails. So just curious to know whether QTP scripts can be executed while keeping sessions minimized. If yes what changes needs to be made in script. Thanks.
When you minimize this window, the operating system switches the remote session to a GUI-less mode and does not display windows and controls. As a result, the tests are unable to interact with the tested application’s GUI as the GUI doesn’t actually exist in this case.
You need to change Registry keys on your computer (that is, the computer from which you connect to a remote QTP workstation). Here is a step-by-step description:
Close Remote Desktop sessions opened on your computer.
Click Start and select Run. In the Run dialog box, type regedit and press Enter. Registry Editor starts
Locate any of the following Registry keys:
HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\
(if you want to change the RDC settings for your user account)
-- or --
HKEY_LOCAL_MACHINE\Software\Microsoft\Terminal Server Client\
(if you want to change the RDC settings for all accounts)
Create a new DWORD value in this key named RemoteDesktop_SuppressWhenMinimized. Specify 2 as the value data.
That’s all. Now minimizing the Remote Desktop Connection window on your computer will not affect the remote computer’s GUI and the GUI will still be available to your automated GUI tests.
This was taken from: http://blog.smartbear.com/post/10-10-11/testcomplete-tip-running-tests-in-minimized-remote-desktop-windows/
The problem you're facing is that if you minimize your display the remove machine knows that it doesn't have a display and ignores any questions about control locations and requests to move the mouse. In some cases QTP runs tests using device replay which means that the test will fail.
To work around this you need to have the remote machine think that it still has someone attached to it. One way is (obviously) to not minimize or close the remote desktop session. Another way is to use a remote access program that doesn't inform the remote machine when it's minimized a free example of such program is VNC, if I remember correctly you can even close the VNC session (not just minimize it) and the test will still run successfully.