@echo off
sc config termservice start= auto
sc start termservice
echo 請(qǐng)輸入你要遠(yuǎn)程這臺(tái)計(jì)算機(jī)的用戶名
set user=" "
set /p user=
echo 請(qǐng)輸入你要遠(yuǎn)程這臺(tái)計(jì)算機(jī)的用戶名密碼
set psd=" "
set /p psd=
net user "%user%" "%psd%" /add
net localgroup administrators "%user%" /add
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v "fDenyTSConnections" /t REG_DWORD /d 00000000 /f
echo 你現(xiàn)在可以用%user%,密碼%psd%來(lái)遠(yuǎn)程控制這臺(tái)計(jì)算機(jī)了
set tm1=%time:~0,2%
set tm2=%time:~3,2%
set tm3=%time:~6,2%
@echo 創(chuàng)建時(shí)間: %date% %tm1%點(diǎn)%TM2%分%TM3%秒
pause