ãããã¯ã¼ã¯æ¥ç¶ãåãããï¼èªåçã«åæ¥ç¶ãã¦ãããããããï¼WiFiã®é»æ³¢ãå¼±ãã¦ãï¼èªåã§ç¡ç·LANã«ã¤ãªããªããï¼
Windowsã§ç¡ç·LANã使ã£ã¦ãã¦ï¼é»æ³¢ãå¼±ãï¼æ¥ç¶ãéåããã
ãããï¼èªåçã«æ¥ç¶ã復æ§ããï¼ãå¶éã¤ãã¢ã¯ã»ã¹ããæåã§è§£é¤ããªããã°ãªããªããé¢åã ã
ãããªã¨ãï¼èªåçã«ãããã«åæ¥ç¶ãã¦ããããã¼ã«ããã£ãã便å©ã ã
ä½ãããªãã¦ãï¼ããããåãããåã³ã¤ãªãã§ãããã
ãããªããããï¼BATãã¡ã¤ã«ã¨ãã¦ä½ã£ã¦ã¿ãã
ä¸è¨ã®ããããã管çè 権éã§å®è¡ããã¦ï¼ãã æ¾ç½®ããã°ããã
@echo off rem rem ç¡ç·LANãè½ã¡ã¦ãããï¼èªåçã«åæ¥ç¶ããããã rem rem æ®ãç§æ°ããã®ã¤ã©å¤åããã¦è¡¨ç¤ºããããã«ï¼å¤æ°ã®é 延å±éãå¿ è¦ setlocal enabledelayedexpansion rem å¦çãçµãã£ããããã«æ»ã£ã¦ãã :START rem ä½ç§éå¾ æ©ããã SET COUNTDOWN_MAX=10 rem å¤æ°ã®é 延å±éã®ããã«ï¼äºåã«å®£è¨ã ããã¦ãã SET COUNT_NOKORI=0 rem ã«ã¦ã³ããã¦ã³ãã rem æå®åæ°ã ãç¹°ãè¿ã for /L %%i in ( 0, 1, %COUNTDOWN_MAX% ) do ( rem æ®ãç§æ°ãå¼ãç®ã§è¨ç®ããªãã SET /a COUNT_NOKORI=%COUNTDOWN_MAX%-%%i rem æ®ãç§æ°ã表示 â»é 延å±éã®ããã«!ã§å²ãã§ããç¹ã«æ³¨æ cls echo ãããã¯ã¼ã¯æ¥ç¶ã®å®ææ¤æ»ã¾ã§æ®ã !COUNT_NOKORI! ç§ rem ï¼ç§ã¹ãªã¼ãï¼XP以ä¸ã§ãéç¨ããï¼pingã使ã£ãæ¹æ³ï¼ ping 127.0.0.1 -n 2 > nul ) rem æéãæ¥ããå®è¡ããå¦ç rem ãããã¯ã¼ã¯æ¥ç¶ãå©ç¨ã§ããªããªã£ã¦ãããï¼ rem ãããã¯ã¼ã¯æ¥ç¶ã³ãã³ãã®å®è¡çµæãï¼å¶éã¤ãã¢ã¯ã»ã¹ã«ãªã£ã¦ãããã©ããã rem ã³ãã³ãã®åºåçµæã調ã¹ã¦ï¼ãããã¯ã¼ã¯ã®ãã¦ã³ã表ãæååãå«ã¾ãã¦ããããæ¤æ» echo ãããã¯ã¼ã¯æ¥ç¶ãæ¤æ»ä¸ã»ã»ã» SET network_down_flag=0 for /f "usebackq tokens=*" %%a in (`ping google.com`) do ( rem æååã«å¯¾ãã¦findã³ãã³ããå®è¡ãï¼å®è¡çµæã®ã¨ã©ã¼ã¬ãã«ã調ã¹ã echo %%a | find "è¦ã¤ããã¾ããã§ãã" >NUL if not ERRORLEVEL 1 ( SET network_down_flag=1 ) echo %%a | find "è¦æ±ãã¿ã¤ã ã¢ã¦ããã¾ãã" >NUL if not ERRORLEVEL 1 ( SET network_down_flag=1 ) rem ãããã°ç¨ã«å¤æ°ã表示 rem echo !network_down_flag! ) if "!network_down_flag!"=="1" ( rem ç¡ç·LANãOFFã«ããï¼â»ãããã管çè ã¨ãã¦å®è¡ãããã¨ï¼ netsh int set int "ã¯ã¤ã¤ã¬ã¹ ãããã¯ã¼ã¯æ¥ç¶" disable rem ç¡ç·LANãONã«ãã netsh int set int "ã¯ã¤ã¤ã¬ã¹ ãããã¯ã¼ã¯æ¥ç¶" enable echo ã¯ã¤ã¤ã¬ã¹ãããã¯ã¼ã¯ã¢ããã¿ãåä½ãã¦ããªãã£ãããï¼åèµ·åãã¾ããã ping 127.0.0.1 -n 20 > nul ) else ( echo ã¯ã¤ã¤ã¬ã¹ãããã¯ã¼ã¯ã¢ããã¿ã¯æ£å¸¸ã«åä½ãã¦ãã¾ãã ping 127.0.0.1 -n 5 > nul ) rem ãããã®æåã«æ»ã goto START
ãã®ãããã§å©ç¨ãã¦ãããã¯ããã¯ã¯â¦
- pingã®å®è¡çµæãforã³ãã³ãã§æååã«æ ¼ç´ãï¼findã³ãã³ãã§ããããããã¦ifã§å¤å®ãã
ã¨ããææ³ã使ã£ã¦ããã
ã³ãã³ãããã³ããã§ã³ãã³ãã®å®è¡çµæãç´æ¥å¤æ°ã«ä»£å ¥ããæ¹æ³ - åçã¡ã¢
http://hanjyuku.info/mt/memo/2011/04/...
- ã³ãã³ãã®å®è¡çµæãç´æ¥å¤æ°ã«ä»£å ¥ããæ¹æ³
batã§ããæååå ã«ç¹å®ã®æååãå«ã¾ãã¦ããã確èªããã - ãã®ä»(ããã°ã©ãã³ã°) - æãã¦ï¼goo
http://oshiete.goo.ne.jp/qa/5704741.html
- ããå¤æ°ãabcãã®ä¸ã«ãtestãã¨ããæåãå«ã¾ãã¦ãããââãè¡ãªãã¨ããåå²
ããããã¡ã¤ã«ã§ãforæã®ä¸ã®setããã¾ãåä½ããªããåå¿è ã®ããã...
http://detail.chiebukuro.yahoo.co.jp/...
- forããå®è¡ãã段éã§ã5è¡ç®ã®éãã«ãã³ã¾ã§ã®å¤æ°ãå±éããã¾ãã
ãããä¸å®ééã ãå¾ æ©ãã¦ããï¼åãå¦çãç¹°ãè¿ããã¨ãã
å¦çã®éª¨çµã¿ã«ãªãé¨åï¼ã¿ã¤ãã¼å¦çï¼ã¯ï¼ä¸è¨ã®ã¨ã³ããªã¼ã®ã³ã¼ããåå°ã«ããã
ãã«ã¦ã³ããã¦ã³å¾ï¼å®æçã«åãã¿ã¤ãã¼ããBATã ãã§ä½ãæ¹æ³ãï¼ãªã¢ã«ã¿ã¤ã ã§æ®ãç§æ°ã表示ãï¼å¦çãå®è¡ï¼
http://language-and-engineering.hatenablog.jp/entry/20140918/BATCountDownTimer
ã¾ãï¼ãããªããããä½ããªãã¦ãï¼
æ®éã¯WiFiã®ãã©ã¤ããèªåçã«æ¥ç¶ã復æ§ãã¦ããããã ãã©ï¼
ããããããªãã±ã¼ã¹ãå®éã«ããã®ã§ã
é¢é£ããè¨äºï¼
batä¸ã§forã«ã¼ãããã¹ããï¼ãµãã«ã¼ãã³ãå¼ã³åºãã¦ï¼æ¡ä»¶ä»ããã¡ã¤ã«æ¤ç´¢ã®çµæãä¸æã³ãã¼ããããï¼ãã¡ã¤ã«åã®éè¤é²æ¢æ©è½ä»ãï¼
http://language-and-engineering.hatenablog.jp/entry/20111030/p1
IE8ã§ï¼ãã¡ã¤ã«ã®ã¢ãããã¼ããèªååããæ¹æ³ããï¼WSH/JScriptã§ãã©ã¦ã¶ãèªåæä½ãããµã³ãã«ã³ã¼ãï¼
http://language-and-engineering.hatenablog.jp/entry/20100909/p1
ãããã§ï¼Wordææ¸ã®å
容ãèªã¿åãããï¼WSH/JScriptã§Wordãã¡ã¤ã«ãæä½ããæ¹æ³ï¼
http://language-and-engineering.hatenablog.jp/entry/20101105/p1
ãããã§ï¼ã¬ã¸ã¹ããªã®å¤ã®èªã¿åãã»æ¸ãè¾¼ã¿ã»åå¨å¤å®ããããï¼WSH/JScriptã§ã¬ã¸ã¹ããªæä½ã®ãµã³ãã«ã³ã¼ãï¼
http://language-and-engineering.hatenablog.jp/entry/20100908/p1