Our social:

July 03, 2015

Network ကို Bat File ေလးနဲ႕ Release & Renew လုပ္မယ္

                                        

ဒီနည္းလမ္းေလးကေတာ့ ပံုမွန္အားျဖင့္လည္း ရိုးရွင္းပါတယ္။Systematically အရကေတာ့ Network and Sharing ကေနတဆင့္ သြားလို႕ရသလို Command Prompt ထဲကေနလည္း"ipconfig /release" "ipconfig /renew" ဆိုၿပီးလုပ္ေဆာင္ရတာပါ။ ဒါေပမယ့္ ကၽြန္ေတာ္အခုေပးမယ့္ Script ေလးကေတာ့IP ကို Release ၊ Renew အျပင္ DNS ကို ပါ လွမ္း Ping တဲ့Script ေလးျဖစ္ပါတယ္။ Batch File ေလးျဖစ္တာေၾကာင့္သံုးရတာလြယ္ကူၿပီး မိမိစိတ္ႀကိဳက္ EXE ဖိုင္အျဖစ္လည္း ေျပာင္းလည္းသံုးစြဲႏိုင္ပါတယ္။ Bat to EXE ေျပာင္းဖို႕ Software ကိုေတာ့္ ဒီ Post မတိုင္ခင္ ေဒါင္းရမယ့္ လင့္ခ္ေပးထားပါတယ္။ယခု Icon ေတြေဒါင္းဖို႕လင့္ခ္ေလးေပးပါ့မယ္။http://www.iconarchive.com/tag/network မွာေဒါင္းပါ။ေရးရမယ့္ Script ကေတာ့

@echo off
title NETWORK RESET SCRIPT
:prompt
color 1f
cls
echo NETWORK RESET SCRIPT
echo.
echo Type r to Reset Network
echo Type p to do a ping test
echo Type c to go to Command Prompt
echo Type q to exit
set /p answer=
if ‘%answer%’ == ‘r’ goto test
if ‘%answer%’ == ‘R’ goto test
if ‘%answer%’ == ‘C’ goto cmd
if ‘%answer%’ == ‘c’ goto cmd
if ‘%answer%’ == ‘q’ goto quit
if ‘%answer%’ == ‘Q’ goto quit
if ‘%answer%’ == ‘P’ goto ping
if ‘%answer%’ == ‘p’ goto ping
pause >nul

:test
cls
echo —————————————————-
echo – RELEASING IP…. -
echo —————————————————-
ipconfig /release >nul
echo.
echo Done!
echo.
echo —————————————————-
echo – RESETTING IP LOG… -
echo —————————————————-
@netsh int ip reset C:WindowsTEMPIPRESETLOG.txt >nul
echo.
echo Done!
echo.
echo —————————————————-
echo – FLUSHING ARP TABLES… -
echo —————————————————-
@arp -d >nul
echo.
echo Done!
echo.
echo —————————————————-
echo – FLUSHING DNS… -
echo —————————————————-
@ipconfig /flushdns >nul
echo.
echo Done!
echo.
echo —————————————————-
echo – RENEWING IP… -
echo —————————————————-
@ipconfig /renew >nul
echo.
echo Done!
echo.
cls
echo —————————————————-
echo Heres Your Status: -
echo —————————————————-
ipconfig /all
echo.
echo Press Any Key to Go To Menu
pause >nul
goto prompt

:ping
cls
echo —————————————————-
echo Starting Ping Test… -
echo —————————————————-
echo.
ping google.com
echo.
echo Press Any Key to goto MENU
pause >nul
goto prompt

:quit
cls
echo Thanks For Using The Network Reset Script
pause
exit

:cmd
@color 7
cls
cmd
@echo on
ဆိုၿပီးျဖစ္ပါတယ္။ ၿပီးသြားရင္ေတာ့ Batch File Format ျဖင့္သိမ္းဆည္းၿပီး အလြယ္တကူလုပ္ေဆာင္ႏိုင္မွာျဖစ္ပါတယ္။

ေလးစားစြာျဖင့္
ေညာင္ညိဳသားေလးသို ့{ ဒီမွာ } သြားလိုက္ပါ



0 comments:

Post a Comment