Windows batch processing: automatically enable remote desktop and obtain information required for Logon. batch processing is required.
The company's office space is located on two different floors, and the problem should be handled back and forth. Therefore, we think about using remote access to solve the problem. Most of my colleagues are not familiar with the computer. It is very costly to use the "Communication Software" and "phone" to teach my colleagues to enable remote desktop communication. In addition, the IP address and account password of the company are not managed in a unified manner. The premise of Using Remote Desktop is as follows: ① enable remote ② get IP address ③ get user name and password. After some thought, it is not complicated to solve these problems through batch processing.
When a colleague encounters a problem: I use the "Communication Software" to send the script to my colleague> execute with my colleague> use the Remote Desktop operation.
You can remotely.
@ Echo offcolor 1 Ftitle Request Remote Assistance echo. echo, right-click "Run as administrator" echo. reg add "HKEY_LOCAL_MACHINE \ SYSTEM \ CurrentControlSet \ Control \ Terminal Server"/v fDenyTSConnections/t REG_DWORD/d 0/f 1> % temp % \ result. tmp: enable remote desktop and hide the original output result if % errorlevel % = 0 (echo enabled remote desktop successfully .) Else (echo failed to enable remote desktop ...): display the output result echo. set/p pass = enter the computer password: echo account: % username %> % temp % \ help.txt echo password: % pass %> % temp % \ help.txt ipconfig | findstr "192.168.4"> % temp % \ ip. tmpset/p a = <% temp % \ ip. tmpecho IP: % :~ -14%> % temp % \ help.txt echo.: Get account, password, IP address information copy % temp % \ help.txt \ 192.168.4.21 \ Share :: copy the computer information to the shared if % errorlevel % = 0 (echo administrator has received the information and is waiting for processing .) Else (failed to send the echo message .) Del % temp % \ ip. tmp & del % temp % \ result. tmp: delete temporary file echo. pause
The effect is as follows: