- ©«¤l
- 83
- ¥DÃD
- 73
- ºëµØ
- 0
- ¿n¤À
- 164
- ÂI¦W
- 0
- §@·~¨t²Î
- xp
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-8-12
- ³Ì«áµn¿ý
- 2015-12-13
|
[¤À¨É] BAT§å¦¸«ü¥O¡G CMD ¡@ªº¥\¯à¤¶²Ð
BAT§å¦¸«ü¥O¡G CMD ¡@ªº¥\¯à¤¶²Ð
CMD ¡G±Ò°Ê Windows ©R¥Oª½Ä¶¾¹·s¨Ò¶µ¡C
«ü¥O¸Ô¸Ñ¡G
CMD [/A | /U] [/Q] [/D] [/E:ON | /E:OFF] [/F:ON | /F:OFF] [/V:ON | /V:OFF]
[[/S] [/C | /K] string]
/C °õ¦æ¦r¦ê¤¤©Ò´yzªº©R¥OµM«áµ²§ô©R¥Oµøµ¡
/K °õ¦æ ¦r¦ê¤¤©Ò´yzªº©R¥OµM«á«O¯d©R¥Oµøµ¡
/S קï¦r¦ê¦b /C ©Î /K (°Ñ¬Ý¤U¤è)
/Q Ãö³¬ echo
/D ±qµn¿ý¤¤°±¥Î AutoRun ©R¥O(°Ñ¬Ý¤U¤è)
/A ±N¤º³¡©R¥O¿é¥Xµ²ªG¥H ANSI ®æ¦¡¾É¦V pipe ©ÎÀÉ®×
/U ±N¤º³¡©R¥O¿é¥Xµ²ªG¥H Unicode ®æ¦¡¾É¦V pipe ©ÎÀÉ®×
/T:fg ³]©w¹õ«e/¹õ«á¦â±m (°Ñ¬Ý COLOR /?)
/E:ON ±Ò¥Î©R¥O©µ¦ù (°Ñ¬Ý¤U¤è)
/E:OFF °±¥Î©R¥O©µ¦ù (°Ñ¬Ý¤U¤è)
/F:ON ±Ò¥ÎÀɮפΥؿý¦WºÙ§¹¾ã¦r¤¸(°Ñ¬Ý¤U¤è)
/F:OFF °±¥ÎÀɮפΥؿý¦WºÙ§¹¾ã¦r¤¸(°Ñ¬Ý¤U¤è)
/V:ON ±Ò¥Î©µ¿ðÀô¹ÒÅܼƩµ¦ù¡A¥Î c §@¬°¤À¹j¦r¤¸¡C
¨Ò¦p¡A/V:ON ¥i¥HÅý !var! ¦b°õ¦æ®É®i¶}ÅÜ¼Æ var¡C
¤åªk var «h·|¦b¿é¤J®É®i¶}ÅܼơA³o¦b FOR °j°é¤§¤¤¬O§¹¥þ¤£¦Pªº¨Æ¡C
/V:OFF °±¥Î©µ¿ðÀô¹ÒÅܼƮi¶}
½Ðª`·N¥Î©R¥O¤À¹j¦r¤¸ '&&' ¹j¶}ªº¦hÓ©R¥O¦pªG³Q¤Þ¸¹¥]§t®É«h·|³Q·í¦¨¦r¦ê¨Ó±µ¨ü¡C
¦¹¥~¡A¬°¤F¬Û®e©Êªºì¦]¡A/X ªº§@¥Î»P /E:ON ¬Û¦P;/Y »P /E:OFF ¬Û¦P¥B /R »P /C ¬Û¦P¡C
¨ä¾lªº°Ñ¼Æ«h·|³Q©¿²¤¡C
¦pªG«ü©w¤F/C ©Î /K¡A«h¦b°Ñ¼Æ«áªº¨ä¾l©R¥O¦C·|³Q·í¦¨©R¥O¦C¨Ó³B²z¡A
¨ä¤¤¨Ï¥Î¤U±ªºÅÞ¿è¨Ó³B²z¤Þ¸¹¦r¤¸ (") :
1. ¦pªG©Ò¦³¤U¦C±ø¥ó³£²Å¦X¡A¨º»ò©R¥O¦C¤Wªº¤Þ¸¹·|³Q«O¯d:
- ¨S¦³ /S °Ñ¼Æ
- ¥¿¦n¦³¨âÓ¤Þ¸¹
- ¦b¨âÓ¤Þ¸¹¤§¶¡¨S¦³¤U¦C¯S®í¦r¤¸: &<>()@^|
- ¨âÓ¤Þ¸¹¤§¶¡¦³¤@¨ÇªÅ®æ
- ¦b¨âÓ¤Þ¸¹¤§¶¡ªº¦r¦ê¬O°õ¦æÀɪºÀɮצWºÙ¡C
2. §_«h¡Aªº¦æ¬°¬O¦pªG²Ä¤@Ó¦r¤¸¬O¤Þ¸¹¡A·|§â«e¸m¦r¤¸¥h±¼¡A
¨Ã±N©R¥O¦C¤¤²Ä¤@Ó¤Þ¸¹¤Î³Ì«á¤@Ó¤Þ¸¹¤§¶¡ªº©Ò¦³¤å¦r«K¦¨«O¯d¤å¦r¡C
¦pªG±z¦b©R¥O¦C¤¤¥¼«ü©w /D¡A·í CMD.EXE °_°Ê«á¡A¥¦·|´M§ä¤U¦C REG_SZ/REG_EXPAND_SZªº µn¿ýÅܼơC
¦pªG¦³¤@Ó¦s¦b©Î¨âÓ³£¦s¦b¡A©R¥O·|°õ¦æ²Ä¤@ÓÅܼơC
HKEY_LOCAL_MACHINE\Software\Microsoft\CommandProcessor\AutoRun
¤Î/©Î
HKEY_CURRENT_USER\Software\Microsoft\CommandProcessor\AutoRun
±N©R¥OÂX¥R¥\¯à¹w³]¦¨±Ò¥Îª¬ºA¡C±z¥i¥H¦b¯S©wªº©I¥s¤¤¡A¥Î /E:OFF °Ñ¼Æ¨Ó°±¥ÎÂX¥R¥\¯à¡C
±z¥i¥H±Ò¥Î©Î°±¥Î¤@¥x¹q¸£¤W©Î¨Ï¥ÎªÌµn¤J¤u§@¶¥¬q¤¤©Ò¦³CMD.EXE ©I¥sªºÂX¥R¥\¯à¡A¦pªG±zn³o¼Ë§@¡A½Ð¨Ï¥Î REGEDT32.EXE ¨Ó³]©w¥H¤Uªº REG_DWORD È:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\EnableExtensions
¤Î/©Î
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\EnableExtensions
¨ì 0x1 ©Î 0x0¡C¨Ï¥ÎªÌ«ü©w³]©wªº°õ¦æÀu¥ý¶¶§Ç°ª©ó¹q¸£¤Wªº³]©w¡C©R¥O¦C°Ñ¼Æªº°õ¦æÀu¥ý¶¶§Ç°ª©óµn¿ý¤¤ªº³]©wÈ¡C
ÂX¥R©R¥O¥]¬A¤U¦C©R¥OªºÅܧó¤Î(©Î)·s¼W:
DEL or ERASE
COLOR
CD or CHDIR
MD or MKDIR
PROMPT
PUSHD
POPD
SET
SETLOCAL
ENDLOCAL
IF
FOR
CALL
SHIFT
GOTO
START (¤]¥]¬A´©¥Î¥~³¡©R¥O¤§Åܧó)
ASSOC
FTYPE
½ÐÁä¤J HELP ©R¥O¦WºÙ¡A¥H¬d¾\»¡©ú¡C
¹w³]ª¬ºA¤U¡A¤£·|±Ò¥Î©µ¿ðÀô¹ÒÅܼÆÂX¥R¡C
±z¥i¥H¨Ï¥Î /V:ON ©Î /V:OFF °Ñ¼Æ¦b°õ¦æ CMD.EXE ®É±Ò¥Î©Î°±¥Î§¹¾ãÀɮצWºÙ¡C
±z¤]¥i¥H¥Î REGEDT32.EXE ¨Óקï¥H¤U REG_DWORD È¡A¨Ó±Ò¥Î©Î°±¥Î¾ãÓ¹q¸£¤W
©Î¨Ï¥ÎªÌµn¤J¤u§@¶¥¬q¤¤©Ò¦³ CMD.EXE ªºÀɮצWºÙ§¹¾ã¥\¯à:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\DelayedExpansion
¤Î/©Î
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\DelayedExpansion
¨äÈ¥i¬° 0x1 ©Î 0x0¡C¨Ï¥ÎªÌ«ü©w³]©wªºÀu¥ý¶¶§Ç°ª©ó¹q¸£³]©w¡C©R¥O¦C°Ñ¼ÆÀu¥ý¶¶§Ç°ª©óµn¿ý³]©wÈ¡C
¦pªG¤w±Ò¥Î©µ¿ðÀô¹ÒÅܼÆÂX¥R¡AÅå¹Ä¸¹¦r¤¸·|¦b°õ¦æ®É³Q¥Î¨Ó¨ú¥NÀô¹ÒÅܼÆÈ¡C
¹w³]µLªk±Ò¥ÎÀɮשM¥Ø¿ý¦WºÙ§¹¦¨¡C
±z¥i¥H¬°¯S©wªº CMD.EXE ©I¥s¡A¥H /F:ON ©Î /F:OFF ¶}Ãö±Ò¥Î©Î°±¥ÎÀɮצWºÙ§¹¦¨¡C
±z¥i¥H±Ò¥Î©Î°±¥Î¦b¦P¤@³¡¹q¸£¤W©Ò¦³ CMD.EXE ªº©I¥s§¹¦¨¤Î/©Î¨Ï¥ÎªÌµn¤J¤u§@¶¥¬q¡C
¤èªk¬O¨Ï¥Î REGEDT32.EXE ³]©w¨ä¤@©Î¨âªÌµn¿ý¤¤ªº REG_DWORD È:
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\CompletionChar
HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor\PathCompletionChar
¤Î/©Î
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\CompletionChar
HKEY_CURRENT_USER\Software\Microsoft\Command Processor\PathCompletionChar
¥Î©ó¯S©w¥\¯àªº±±¨î¦r¤¸¤Q¤»¶i¦ìÈ (¨Ò¦p 0x4 ¬O Ctrl-D ; 0x6 ¬OCtrl-F)¡C
¨Ï¥ÎªÌ«ü©w³]©wªº°õ¦æÀu¥ý¶¶§Ç°ª©ó¹q¸£¤Wªº³]©w¡C
©R¥O¦C°Ñ¼Æªº°õ¦æÀu¥ý¶¶§Ç°ª©óµn¿ý¤¤ªº³]©wÈ¡C
¦pªG¥H /F:ON ¶}Ãö±Ò¥Î§¹¦¨¡A«h¥Î©ó¥Ø¿ý¦WºÙ§¹¦¨ªº±±¨î¦r¤¸¬O Ctrl-D¦Ó¥Î©óÀɮצWºÙ§¹¦¨ªº±±¨î¦r¤¸¬O Ctrl-F¡C
¦pªG±zn°±¥Î¦bµn¿ý¤¤ªº¯S©w§¹¦¨¦r¤¸¡A½Ð¨Ï¥ÎªÅ¶¡È (0x20)¡A¦]¬°¥¦¤£¬O¥¿½Tªº±±¨î¦r¤¸¡C
·í±zÁä¤J¨ä¤¤¤@Ó±±¨î¦r¤¸«á¡A§¹¦¨¥\¯à·|³Q±Ò°Ê¡C
¦pªG¸ô®|¦r¦ê¤w¦s¦b¡A¦Ó¥B©Ò«Ø¥ßªº¸ô®|²M³æ¤]²Å¦Xªº¸Ü¡A§¹¦¨¨ç¼Æ·|Ū¨ú¨ì«ü¼Ð©Ò¦b¥ª¤è¬°¤îªº¸ô®|¦r¦ê¡C
µM«á¥¦·|Åã¥Ü²Ä¤@ӲŦXªº¸ô®|¡C
¦pªG§ä¤£¨ì²Å¦Xªº¸ô®|¡A¥¦·|µo¥X¹ÍÁn¨Ã«O¯dÅã¥Ü¡C
¦pªG±z«ÂЫö¬Û¦Pªº±±¨î¦r¤¸¡A¥¦±N¦b²Å¦Xªº¸ô®|²M³æ¤¤´`Àô°õ¦æ¡C
¦pªG±z¦P®É«ö¤U Shift Áä»P±±¨î¦r¤¸¡A¥i¦b²M³æ¤¤¤Ï¦V²¾°Ê¡C
¦pªG±z¶i¦æ½s¿è«á¦A«ö±±¨î¦r¤¸ªº¸Ü¡A¤wÀx¦sªº²Å¦X¸ô®|²M³æ·|³Q¥á±ó¡A¨Ã«Ø¥ß·sªº²M³æ¡C
¦pªG±z¦bÀɮפΥؿý§¹¦¨¥\¯à¤§¶¡¤Á´«¡A·|¦³¦P¼Ëªº±¡ªpµo¥Í¡C
³o¨âÓ±±¨î¦r¤¸¤£¦P¤§³B¬O : Àɮק¹¦¨¦r¤¸¥i¦P®É¹ïÀ³ÀɮפΥؿý¦WºÙ¡A¦Ó¥Ø¿ý§¹¦¨¦r¤¸¥u¯à¹ïÀ³¥Ø¿ý¦WºÙ¡C
¦pªG±z±NÀɮק¹¦¨¥\¯à¥Î¦b¤º«Ø¥Ø¿ý©R¥O¤W (CD¡AMD ©Î RD) ¤]µ¥©ó¨Ï¥Î¤F¥Ø¿ý§¹¦¨¥\¯à¡C
¦pªG±z¦b¸ô®|¦r¦ê¨âºÝ¥[¤W¤Þ¸¹¡A§¹¦¨¥\¯àÁä´N¥i¥¿½T³B²z¥]§tªÅ®æ©Î¨ä¥L¯S®í¦r¤¸ªºÀɮצWºÙ¡C
ÁÙ¦³¡A¦pªG±z³Æ¥÷«á¡A¤S¦b©R¥O¦C¤¤©I¥s§¹¦¨¥\¯àªº¸Ü¡A¤w©I¥s¹L§¹¦¨¥\¯àªº«ü¼Ð¥k¤èªº¤å¦r·|³Q¥á±ó¡C
n¨D¥[¤W¤Þ¸¹ªº¯S®í¦r¤¸¦³:
<space>
&()[]{}^=;!'+,`~ |
|