I am wondering if there is any way to unlock Windows 7 screen lock using a script. I have administrator permissions on this machine.
I know this question have been asked before without a solution, but I hope someone has come up with answer since.
I would like a script or program to be run, when certain conditions are met, which in result unlocks the screen.
Alternatively is there any possibility to reliably disable communication with a computer with keyboard and mouse strokes while it displays a black screen?
By that I mean: can I use low level programming to create screen lock which I can control. I hope it won't be necessary, as I got very promising answer.
Best Answer
You can define and save an RDP file with all needed options, and point it to the machine to make the connection. You will set the configuration to save the credential and then enter and save the credential values. Now each time you double-click the RDP icon (from that same account and machine you created it on), it should automatically load the desktop for the user account credential you saved without needing to enter the password.
Configure RDP Icon
Press the Windows Flag Key one time and then immediately start to type in "MSTSC" or "Remote Desktop Connection" to find the Remote Desktop Connection app to launch, and then follow the below instructions for further steps.
Configure a Remote Desktop Connection and then Save to an RDP File
Type in the MachineName\Username in the Username field
Be sure to select\check the Allow me to save credentials option
Press the Connect option and then follow the instructions below the screen shot below for what to do next to save the credential, and the rest
Type in the password of the account making the remote connection in the Password field (screen shot below)
Now follow the instructions below for creating a batch script that will launch the RDP file to open the Remote Desktop Connection to the machine without needing to enter a password for the connection.
For the last step you will create a batch script that will launch that RDP file you just defined and saved to open the connection without prompting for password. Be sure the full explicit path is what you point the script to for where you saved the RDP file in step #4 above where the script example has
"C:\Users\User\Desktop\<ServerName or IP Address>.rdp"
.Batch Script using MSTSC