ã³ãã³ãã©ã¤ã³ããããã»ã¹ãèµ·åã»çµäºããæ¹æ³ãï¼ç°å¢å¤æ°ã¨ã¬ã¸ã¹ããªã«ã¤ãã¦ï¼
Windows ã³ãã³ãããã³ããä¸ããï¼ã¢ããªã±ã¼ã·ã§ã³ãèµ·åãããçµäºããããããæ¹æ³ã
- C:\WINDOWS\system32\taskmgr.exe
- C:\Program Files\Internet Explorer\iexplore.exe
- C:\Program Files\ffftp\FFFTP.exe
ã®ï¼ã¤ã®ã¢ããªã±ã¼ã·ã§ã³ã«ã¤ãã¦ï¼ï¼ç¨®é¡ã®ç°ãªãèµ·åæ¹æ³ãåå¨ããã®ã確èªããã
ãã®é¢ã§ã³ãã³ãããã³ãããæã®å»¶é·ã«ããã°ï¼ãã¡ãã¡ã®ãã©ã«ããæ¢ãã¾ããäºãªãã¢ããªã±ã¼ã·ã§ã³ãèµ·åã§ãã¦ä¾¿å©ãªã¯ãã
ï¼ï¼ï¼ãPATHãå©ç¨ãã¦èµ·å
ã³ãã³ãã©ã¤ã³ã«
taskmgr.exe
ã¨æã¡ããã¨ã¿ã¹ã¯ããã¼ã¸ã£ãèµ·åãããã
ãã¡ã¤ã«åã ãã§èµ·åã§ããçç±ã¯ï¼ãã®ãã¡ã¤ã«ã®åå¨ãããã£ã¬ã¯ã㪠C:\WINDOWS\system32\ ãï¼ç°å¢å¤æ°PATHã«å«ã¾ãã¦ããããã
PATHãGUIä¸ã§è¨å®ããã«ã¯ï¼ããç¥ããã¦ããéã
- Windowsãã¼+E ã§ãã¤ã³ã³ãã¥ã¼ã¿ãéãã¦ãã
- ãã¤ã³ã³ãã¥ã¼ã¿
- âã³ã³ããã¼ã«ããã«
- âã·ã¹ãã
- â詳細è¨å®
- âç°å¢å¤æ°
- âPATH ãç·¨éããã
ããã§ã¯æä½ãé¢åãªã®ã§ï¼ã³ãã³ãã©ã¤ã³ä¸ãã
set PATH=%PATH%;C:\Program Files\ffftp\;
ã®ããã«è¿½å è¨å®ãããã¨ãã§ããã
ãã®è¨å®å¾ã¯ï¼ãFFFTP.exeãã¨å ¥åããã ã㧠FFFTP ãå©ç¨ã§ããã
ãã ãï¼set ã³ãã³ãã§è¨å®ããå¤æ°ã¯ï¼ãã®ã³ãã³ãããã³ããã®ã¦ã£ã³ãã¦ãéãã¦ããéã®ã¿æå¹ããã使ããªããªã£ã¦ãã¾ãã
(setã®ãããã«ãPATHãã¨ããååã®å¥ã®ã³ãã³ãããããï¼ããã使ã£ã¦ç´æ¥pathãè¨å®ãã¦ãï¼æå¹æéã¯åãã§ããã)
ãªã®ã§ï¼æ¬å½ã«ãã使ãã¢ããªã±ã¼ã·ã§ã³ãéä¸ãã¦åå¨ãããã£ã¬ã¯ããªã®ã¿ï¼ã³ã³ããã¼ã«ããã«ããPATHãéãããã«ãã¦ããã®ãããã ããã
ï¼ï¼ï¼ãã¬ã¸ã¹ããªãå©ç¨ãã¦èµ·å
IEãèµ·åãããå ´åï¼ iexplore.exe ã¨æã¡ããã ã ãã§ã¯
'iexplore.exe' ã¯ãå é¨ã³ãã³ãã¾ãã¯å¤é¨ã³ãã³ãã
æä½å¯è½ãªããã°ã©ã ã¾ãã¯ããã ãã¡ã¤ã«ã¨ãã¦èªèããã¦ãã¾ããã
ã®ã¨ã©ã¼ã¡ãã»ã¼ã¸ãåºãã
åå ã¯ï¼IEã¯PATHã®éã£ããã£ã¬ã¯ããªä¸ã«ã¯åå¨ããªãããã
ãããã«
start iexplore.exe
ã¨ããã°IEãèµ·åã§ããã
startã³ãã³ãã¯ï¼HKLM\Software\Microsoft\Windows\CurrentVersion\App Pathsãã¨ããã¬ã¸ã¹ããªãã¼ã®å¤ãåç §ããã
ããããã®ã¬ã¸ã¹ããªã®ä¸ã«ã¢ããªã±ã¼ã·ã§ã³ã®ãã¡ã¤ã«ãã¹ãå«ã¾ãã¦ããã°ï¼
- start ãã¡ã¤ã«å
- ããã¡ã¤ã«åãæå®ãã¦å®è¡ã
ã®ã©ã¡ããããå®è¡ããäºãã§ããã®ã ã
試ãã«ï¼ãã®ã¬ã¸ã¹ããªãã¼ã®ä¸ã«ï¼IEãå«ã¾ãã¦ããäºã確èªãã¦ã¿ããã
regeditã使ã£ã¦GUIä¸ã§ç¢ºèªããæãããããããï¼ãã£ããã ããã³ãã³ãã©ã¤ã³ä¸ããã¬ã¸ã¹ããªãã¼ã®å¤ã表示ãããäºã«ããã
reg query ã¬ã¸ã¹ããªãã¼å
ã§ã¬ã¸ã¹ããªã®å¤ã表示ã§ãããï¼ãã¼ã«ç©ºç½ãå«ãã®ã§ï¼ããã§ã¯
reg query "HKLM\Software\Microsoft\Windows\CurrentVersion\App Paths" | findstr /I ".exe"
ã¨ããã
finsdtr ã§ã.exeããå«ãè¡ã ããæ½åºè¡¨ç¤ºããã¦ããã/I ã¯ï¼å¤§æåã»å°æåã®åºå¥ãç¡è¦ãããªãã·ã§ã³ã
åºåçµæãè¦ãã¨ï¼ç¢ºãã«
HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE
ã¨ããã®ãå«ã¾ãã¦ããã
ãã®ãããã§ï¼IEãExcelãªã©ã®ã¢ããªã±ã¼ã·ã§ã³ã¯PATHã«è¨å®ãç¡ãã«ãé¢ãããï¼ãstartããããï¼ããã¡ã¤ã«åãæå®ãã¦å®è¡ããããï¼ãã¡ã¤ã«åã ãã§å®è¡ããäºãã§ããã®ã ã
App Pathsã¨regã³ãã³ãã®è©³ç´°ã¯ä¸è¨ãåç §ï¼
IEãExcelãªã©ãPATHã«ãªãã¢ããªãèµ·åããããããã·ã§ã¼ãã«ããã®ä½ãæ¹
http://scripting.cocolog-nifty.com/blog/2007/02/ieexcelpath_6480.htmlã³ãã³ãã»ããã³ããã§ã¬ã¸ã¹ããªãæä½ãã
http://www.atmarkit.co.jp/fwin2k/win2ktips/391cmdreg/cmdreg.html
ã¾ãï¼startã³ãã³ãã¯ï¼åã®ããã»ã¹ã®çµäºãå¾
ããã«é£ç¶ãã¦ã¢ããªã±ã¼ã·ã§ã³ãèµ·åããããã«ãå©ç¨ã§ããã
http://okwave.jp/qa2167876.html
ãã åã«
"[IEã®ãã¹]\iexplorer.exe"
ã¨ï¼è¡æ¸ããã ãã ã¨ãã¾ãIEãã²ã¨ã¤éãã¦ãã¨ã¾ã£ã¦ãã¾ã
éããIEãéããã¨ã¾ãIEãéãããããéãããã¾ãIEãéãã
ã¨è¨ãããã«ãéããªãã¨ããããã¡ã¤ã«ãå ã«é²ãã§ããã¾ããã
Windows ã®ã³ãã³ã ããã³ããããããã°ã©ã ãèµ·åããæ¹æ³
http://support.microsoft.com/kb/126410/ja
ï¼ï¼ï¼ã絶対ãã¹æå®ã§èµ·å
PATHãã¬ã¸ã¹ããªã®æä½ãªãã«ï¼C:\Program Files\ffftp\FFFTP.exeããèµ·åãããã¨ãããã
ã³ãã³ãã©ã¤ã³ããï¼ãã®éãã®ãã¹ãæã¡è¾¼ãã¨
âC:\Programâã¯ãå é¨ã³ãã³ãã¾ãã¯å¤é¨ã³ãã³ããæä½å¯è½ãªããã°ã©ã ã¾ãã¯ããããã¡ã¤ã«ã¨ãã¦èªèããã¦ãã¾ããã
ã¨ããã¨ã©ã¼ã¡ãã»ã¼ã¸ãè¿ã£ã¦ããã
åå ã¯ï¼ãã¡ã¤ã«ãã¹ã«ã¹ãã¼ã¹ãå«ã¾ãã¦ããããã
ãã®ã¨ã©ã¼ãåé¿ããããã«ã¯ï¼
"C:\Program Files\ffftp\FFFTP.exe"
ã®ããã«äºéå¼ç¨ç¬¦ã§ãããã°ããã
ãC:ãã®ããã«ãã©ã¤ãåãå«ãé¨åãç°å¢éä¾åã«ããããã«ã¯
"%ProgramFiles%\FFFTP\ffftp.exe"
ã®ããã«ï¼çµ¶å¯¾ãã¹ä¸ã«ç°å¢å¤æ°ãå«ããã
ãªãï¼PCå ã§å®ç¾©ããã¦ããç°å¢å¤æ°ã®ä¸è¦§ããªã¹ã表示ãããã«ã¯
set
ã¨å ¥åããã°ããã
ProgramFiles=C:\Program Files
ã®ãããªè¨å®ç¶æ³ã確èªã§ããã
ï¼ï¼ï¼è¨ç½®ãã£ã¬ã¯ããªã¾ã§ç§»åãã¦èµ·å
ã¢ããªã±ã¼ã·ã§ã³ãèµ·åããã®ã¡ï¼ãã®ããã°ã©ã ã®åå¨ãããã£ã¬ã¯ããªä¸ã§ä½ãããå¦çãè¡ãªãããã¨ããã
ãã®å ´åï¼çµ¶å¯¾ãã¹æå®ã§ããããæä½ãããããï¼ã¢ããªã±ã¼ã·ã§ã³ã®åå¨ãããã£ã¬ã¯ããªã¾ã§ä¸åº¦ç§»åãã¦ãã¾ã£ãæ¹ã楽ã ã
cd "%ProgramFiles%\FFFTP" ffftp.exe
è¤æ°è¡ã®å½ä»¤ãä¸è¡ã«ã¾ã¨ãã¦æ¸ããããªãã°ï¼& ã§ã¤ãªãã¦
cd "%ProgramFiles%\FFFTP" & ffftp.exe
ã¨ããäºãã§ããã
ãããããã§ã¯ï¼å ã®ãã©ã«ãã«æ»ãã®ãé¢åã ã
訪åãããã©ã«ãã®ãå±¥æ´ããä½æãã¦ï¼åãããã©ã«ãã«æ»ãæ¹æ³ãããã
- pushd ãã©ã«ãå ï¼ãã£ã¬ã¯ããªã移åãï¼ç§»åå ãã£ã¬ã¯ããªãå±¥æ´ã¨ãã¦è¨æ¶ããã
- popd ï¼ä»¥åã«è¨æ¶ããããã£ã¬ã¯ããªã«æ»ã
ã®ï¼ã¤ã®ã³ãã³ãã使ãã
pushd . ã popd
ãã®é¨åã«å¦çãæ¸ãã
ã.ãã¯pushdå®è¡æã®ã«ã¬ã³ããã£ã¬ã¯ããªã¨è§£éããï¼ãã¨ã§ããã«æ»ã£ã¦ãããã¨ãã§ããã
ä¸ã®ä¾ã§ããã°ï¼
pushd . cd "%ProgramFiles%\FFFTP" ffftp.exe ãããã®ãã©ã«ãä¸ã§ã®ä½ããã®å¦ç popd
ã®ããã«ãªãã
èµ·åã®æ¹æ³ã¯ãããï¼ã¤ã
ã³ãã³ãã©ã¤ã³ã§ããã»ã¹ãçµäºããã
çµäºã®æ¹æ³ã«ç§»ãã
Windowsèªä½ãçµäºãããå ´åã¯ï¼shutdownã³ãã³ãã使ãã
ãã¹ã¦ã®ããã°ã©ã ãå¼·å¶çµäº shutdown -f åèµ·å shutdown -r
ããã¯ãªã¢ã¼ããã¹ã¯ãããã§ã®æä½æãªã©ï¼çµäºãã¿ã³ã表示ã§ããªãç°å¢ã§ãã使ãã
åä¸ã®ããã»ã¹ã ããçµäºããããå ´åã¯ï¼taskkillã使ãã
http://ykr414.com/dos/dos04.html#29
ããã»ã¹IDã§æå®ãã¦çµäº taskkill /pid 1234 ããã»ã¹åã§æå®ãã¦çµäº taskkill /fi "imagename eq iexplore.exe"
æ®å¿µãªããï¼taskkillã³ãã³ãã¯XP home editionã«ã¯å ¥ã£ã¦ããªãã
ãããã«ï¼ä»£æ¿ã½ããã使ã£ã¦taskkillã¨åãæ©è½ãå®ç¾ããäºãã§ããã
taskkillç°¡æç
http://www.vector.co.jp/soft/winnt/util/se401845.html
ä½ãã½ããããã¦ã³ãã¼ãããã®ã¯é¢åã ã¨ããå ´åï¼WSHã§ä¸è¨ã®ã¹ã¯ãªãããä½æã»å®è¡ããæãããã
var ws = WScript.CreateObject("WScript.Shell"); ws.AppActivate("ãã¹ã¿é³é"); ws.Sendkeys("%{F4}");
ãããã.jsã§ä¿åãã¦ããã«ã¯ãªãã¯ã§å®è¡ããã¨ï¼ããã¹ã¿é³éãã¨ããé¡åã®ã¦ã£ã³ãã¦ï¼ã¤ã¾ãããªã¥ã¼ã ã³ã³ããã¼ã«ï¼ãèªåçã«éããããã
ã¢ããªã±ã¼ã·ã§ã³ã®ã¿ã¤ãã«ããããå ´åã¯ä¾¿å©ã ããã
ã¾ãï¼WSHå ã§èµ·åããããã»ã¹ã§ããã°ï¼Terminateã¡ã½ããã使ã£ã¦çµäºã§ããã
Windows Script FAQ / ã¢ããªã±ã¼ã·ã§ã³ãçµäºããã«ã¯ï¼
http://winscript.s41.xrea.com/wiki/index.php?FAQ#content_1_9
èµ·åã»çµäºæ¹æ³ã®ã¾ã¨ã
èµ·å
- PATH追å
- set PATH=%PATH%;ãã¡ã¤ã«ãã¹
- ãã¡ã¤ã«åãã§èµ·å
- ã¬ã¸ã¹ããªè¿½å
- start ãã¡ã¤ã«åãã§èµ·å
- 絶対ãã¹
- "%ProgramFiles%\ãã¡ã¤ã«ãã¹"ãã®ããã«èµ·å
- 移åãã¦æ»ã
- pushd . & cd ãã¡ã¤ã«ãã¹ & å®è¡ & popd
çµäº
- ããã»ã¹ãã¨ã«
- taskkill /pid 1234
- taskkill /fi "imagename eq iexplore.exe"-
- WSH
- Sendkeys("%{F4}")
- Windowsèªä½
- shutdown -f
- shutdown -r (åèµ·å)
ã½ããã¦ã§ã¢ã®èµ·åããããèªã¿æ¸ãããéã«å½¹ç«ã¤ã ãããï¼ç¹ã«ç°å¢å¤æ°åãã®æ±ãæ¹ï¼
é¢é£ããè¨äºï¼
ã³ãã³ãããã³ããã§ï¼æè¨ããã¹ãï¼ï¼ã®å¿ é ã³ãã³ããã(åå) ãã¡ã¤ã«å¦çç³» - 主ã«è¨èªã¨ã·ã¹ãã éçºã«é¢ãã¦
http://d.hatena.ne.jp/language_and_engineering/20081001/1222857265
ãããã§ï¼ã¬ã¸ã¹ããªã®å¤ã®èªã¿åãã»æ¸ãè¾¼ã¿ã»åå¨å¤å®ããããï¼WSH/JScriptã§ã¬ã¸ã¹ããªæä½ã®ãµã³ãã«ã³ã¼ãï¼ - 主ã«è¨èªã¨ã·ã¹ãã éçºã«é¢ãã¦
http://d.hatena.ne.jp/language_and_engineering/20100908/p1
å ±æãã©ã«ãä¸ã§ï¼ãã¦ã¹ã ãã§ä¸çºã§ã³ãã³ãããã³ãããéãæ¹æ³ãï¼UNCãã¹ã¸ã®pushdããããã¯ãªãã¯ã§æ¸ã¾ããï¼ - 主ã«è¨èªã¨ã·ã¹ãã éçºã«é¢ãã¦
http://d.hatena.ne.jp/language_and_engineering/20090305/p1
ã³ãã³ãããã³ããããï¼Win32 APIãä»»æã®DLLãå¼ã³åºãã¦å®è¡ããããï¼ã³ãã³ãããã³ããããç»é¢ãã£ããã£ããæ¹æ³ã®ä»çµã¿ãçè§£ï¼ - 主ã«è¨èªã¨ã·ã¹ãã éçºã«é¢ãã¦
http://d.hatena.ne.jp/language_and_engineering/20100804/p1
ã¡ã¢ãªã»CPUãªã©ãã¼ãã¦ã§ã¢ã®æ§ææ å ±ãï¼ãããã§åå¾ããããï¼WSH/JScriptã§WMIã使ãæ¹æ³ï¼ - 主ã«è¨èªã¨ã·ã¹ãã éçºã«é¢ãã¦
http://d.hatena.ne.jp/language_and_engineering/20100906/p1
ã