04-06-2007, 17:13
|
|
|
|
חבר מתאריך: 20.03.07
הודעות: 502
|
|
אחי הצלחתי, תראה את הקוד החדש,
:ren
cls
echo.
echo.
netsh interface show interface | find "Dedicated" >%temp%\kk
for /f "eol=; tokens=3* delims=, " %%i in (%temp%\kk) do set old=%%i %%j
netsh interface set interface name = "%old%" newname = "%2 %3 %4 %5 %6 %7 %8 %9"
cls
echo.
echo.
echo Change Interface Name Complete
echo.
echo If It Not Changed Du problem, Use "Net Renx Newname"
echo.
echo your New name limited, up to 9 words only U Dont need More
sleep 4
goto name
:renX
cls
echo.
echo.
netsh interface show interface | find "Dedicated" >%temp%\kk
for /f "eol=; tokens=3* delims=, " %%i in (%temp%\kk) do set old=%%i
netsh interface set interface name = "%old%" newname = "%2 %3 %4 %5 %6 %7 %8 %9"
echo.
echo.
echo Now its Relly Change your Interface Name ...
echo.
echo If not u can die, it's fine for me ...
echo.
echo I Relly Dont Care ...
sleep 2
goto name
:Name
cls
echo.
echo.
echo.
netsh interface show interface | find "Dedicated" >%temp%\kk
FOR /F "eol=; tokens=3* delims=, " %%i in (%temp%\kk) do @echo Your Interface name is %%i %%j
del %temp%\kk
goto :END
:ENABLE
cls
echo.
echo.
if NOT exist %~dp0NICs.lst goto :GETNICIDS
call :NICID "%~2"
echo Enabling %NICFN%
devcon ENABLE "%HWID%
goto :EOF
:DISABLE
cls
echo.
echo.
if NOT exist %~dp0NICs.lst goto :GETNICIDS
call :NICID "%~2"
echo Disabling %NICFN%
devcon DISABLE "%HWID%
goto :EOF
פתרתי את כל הבעיות פועל חלק חלק בעזרתך, חלק ממני והחלק של %2 פועל טוב %1 לא פועל טוב בסקריפט כי הוא עושה את זה, net ren ????
ולוקח את REN בתור משתנה
אבל שמע משהו ענק %2 לוקח את השלישי ?????,
חוץ מזה יש לי עוד שאלה,
את אני יכול לעשות עוד מערך פקודות לפני Enable בשם Ena, שיפעיל לי את Enable עם השם החדש.....
דהיינו Net ena, יפעיל לי את Net enable ????, (ע"י הסקריפט המוכן כבר למצוא את שם הרשת)....
ניסיתי משהו כזה
:ena
netsh interface show interface | find "Dedicated" >%temp%\kk
for /f "eol=; tokens=3* delims=, " %%i in (%temp%\kk) do set kk=%%i %%j
פה אני רוצה לדחוף שורה שתפעיל את Enable +משתנה KK, יש לך רעיון שעובד???
וכנ"ל עם ה Disable,....
_____________________________________
|