تغيير اسم كروت الشبكة في الحاسب عن طريق سكربت

Опубликовано: 16 Ноябрь 2024
на канале: Dr-eng khaled yassin alsheikh
124
3

@echo off
setlocal

rem طلب اسم كرت الشبكة القديم
set /p oldName="Enter the old name of the network card: "

rem طلب الاسم الجديد لكرت الشبكة
set /p newName="Enter the new name for the network card: "

rem تغيير اسم كرت الشبكة
netsh interface set interface name="%oldName%" newname="%newName%"

if %ERRORLEVEL% EQU 0 (
echo The network card name has been changed from "%oldName%" to "%newName%"
) else (
echo حدث خطأ أثناء تغيير الاسم. يرجى التحقق من أن الاسم القديم صحيح.
)
pause
========================================
netsh interface set interface name="Ethernet " newname="it"
netsh interface set interface name="Local Area Connection" newname="it"