@echo off
echo ==========================================
echo    Enabling Remote Desktop Service...
echo ==========================================
echo.

echo [1/5] Enabling Remote Desktop Access...
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f >nul

echo [2/5] Disabling Network Level Authentication (NLA)...
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp" /v UserAuthentication /t REG_DWORD /d 0 /f >nul

echo [3/5] Starting Remote Desktop Service...
sc config TermService start= auto >nul
net start TermService >nul 2>&1

echo [4/5] Configuring Firewall Rules...
netsh advfirewall firewall set rule group="remote desktop" new enable=Yes >nul

echo [5/5] Setting Admin Password...
net user Admin Aa.112233 >nul
net localgroup "Remote Desktop Users" Admin /add >nul 2>&1

echo.
echo ==========================================
echo    Configuration Complete!
echo ==========================================
echo.
echo Remote Desktop is now enabled.
echo Username: Admin
echo Password: Aa.112233
echo.
pause
