ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[¤À¨É] §å¦¸ÀÉBAT¤¤À³¥ÎWindowsªº36­ÓÀô¹ÒÅܼÆ

[¤À¨É] §å¦¸ÀÉBAT¤¤À³¥ÎWindowsªº36­ÓÀô¹ÒÅܼÆ

Àô¹ÒÅܼƤj¦h¼Æ¬O¬°µ{¦¡©Ò¥Î¡A¨Ò¦p¹ï¦³¦b¼g¼g¤@¨Ç²³æªº¦Û°Ê¤Æ§å¦¸ÀÉBAT(Batch File)ªº¤H¨Ó»¡«D±`¹ê¥Î¡A¯à°÷±oª¾¨t²Îªº¬ÛÃö¸ê°T¡C
¤£¹L¡A§Ú­Ì¤]¥i¥H¡yÀÉ®×Á`ºÞ¡z©Î¡y°õ¦æ¡z¥æ½Íµ¡¡A°t¦X°O¿ý¸ê®Æ§¨¦ì¸mªºÀô¹ÒÅܼơA§Ö³t¶}±Ò¸ê®Æ§¨¡C
¨Ò¦p±N%windir%¿é¤J¨ì¡yÀÉ®×Á`ºÞ¡zªº¡yºô§}¡z¦C¡A¦A«ö¤UEnter«öÁä¡A¡yÀÉ®×Á`ºÞ¡zÀH§Y¤Á´«¨ìWindows¨t²Î¸ê®Æ§¨¡C

%ALLUSERSPROFILE%¡GAll Users³]©wÀɪº¸ê®Æ§¨¦ì¸m¡C
%APPDATA%¡G¥Ø«e¨Ï¥ÎªÌªºApplication Data¸ê®Æ§¨¦ì¸m¡C
%CD%¡G¥Ø«eªº¤u§@¸ê®Æ§¨¡C
%CLIENTNAME%¡G¥Ø«e¨Ï¥ÎªÌªºNETBIOS¹q¸£¦WºÙ¡C
%CMDCMDLINE%¡G³B²z¥Ø«e©R¥O´£¥Ü¦r¤¸µøµ¡©R¥Oªºcmd.exeªº§¹¾ã¸ô®|¡C
%CMDEXTVERSION%¡G¥Ø«eCommand Processor Extensionsªºª©¥»¡C
%CommonProgramFiles%¡GCommon Files¸ê®Æ§¨ªº¸ô®|¡C
%COMPUTERNAME%¡G¹q¸£¦WºÙ¡C
%COMSPEC%:¡G©R¥O´£¥Ü¦r¤¸µøµ¡ªº¸ÑĶµ{¦¡¸ô®|¡A³q±`»P%CMDCMDLINE%¬Û¦P¡C
%DATE%¡G¥Ø«eªº¨t²Î¤é´Á¡C
%ERRORLEVEL%¡G³Ìªñ°õ¦æ¹Lªº©R¥Oªº¿ù»~½X¡F«D¹sªº­Èªí¥Üµo¥Í¹Lªº¿ù»~½X¡C
%HomeDrive%¡G¨Ï¥ÎªÌ¥Ø¿ýªººÏºÐ¾÷¡C
%HomePath%¡G¨Ï¥ÎªÌ®a¥Ø¿ý¡C
%HOMESHARE%¡G¥Ø«e¨Ï¥ÎªÌ¦@¥Î¸ê®Æ§¨ªººô¸ô¸ô®|¡C
%LOGONSEVER%¡G¥Ø«e¨Ï¥ÎªÌ©Òµn¤Jªººô¸ô±±¨î¾¹¦WºÙ¡C
%NUMBER_OF_PROCESSORS%¡G¹q¸£ªº³B²z¾¹¼Æ¶q¡C
%OS%¡G§@·~¨t²Î¦WºÙ¡A¨ä­È©T©w¬°Windows_NT¡C
%Path%¡G°õ¦æÀɪº·j´M¸ô®|¡C
%PATHEXT%¡G§@·~¨t²Î¬O¬°°õ¦æÀɪº°ÆÀɦW¡C
%PROCESSOR_ARCHITECTURE%¡G³B²z¾¹ªº¬[ºc¦WºÙ¡A¨Ò¦px86¡C
%PROCESSOR_IDENTFIER%¡G»¡©ú³B²z¾¹ªº¤å¦r¡]¤£¤@©w·|¦³¦¹Àô¹ÒÅܼơ^¡C
%PROCESSOR_LEVEL%¡G³B²z¾¹ªºmodel number¡C
%PROCESSOR_REVISION%¡G³B²z¾¹ªºrevision number¡C
%ProgramFiles%¡GÀ³¥Îµ{¦¡¥Ø¿ý¡A¹w³]¬OC:\Program Files¡C
%PROMPT%¡G¥Ø«e¸ÑĶµ{¦¡ªº©R¥O´£¥Ü¦r¦ê¡C
%RANDOM%¡GÅã¥Ü0¨ì32767¤§¶¡ªº¤Q¶i¦ì¾ã¼Æ¶Ã¼Æ¡C
%SESSIONNAME%¡G³s¤W²×ºÝ¦øªA¾¹ªºsession names¡C
%SystemDrive%¡G¨t²ÎºÏºÐ¾÷¡A¹w³]¬OC:¡C
%SystemRoot%¡G¨t²Î®Ú¥Ø¿ý¡A¹w³]¬OC:\WINNT©ÎC:\WINDOWS¡C
%SystemDirectory%¡G¨t²Î¥Ø¿ý¡A¹w³]¬OC:\WINNT\System32©ÎC:\WINDOWS\System32¡C
%Temp%¡B%Tmp%¡G¼È¦sÀɥؿý¡C
%TIME%¡G¥Ø«eªº¨t²Î®É¶¡¡C
%UserDomain%¡G¥]§t¨Ï¥ÎªÌ±b¸¹ªººô°ì¦WºÙ¡A©ÎªÌ¹q¸£¦WºÙ¡C
%UserName%¡G¨Ï¥ÎªÌ±b¸¹¦WºÙ¡C
%USERPROFILE%¡G¥Ø«e¨Ï¥ÎªÌªº³]©wÀɸô®|¡C
%WinDir%¡GWindows¥Ø¿ý¡A¹w³]¬OC:\WINNT©ÎC:\WINDOWS¡C

¨t²Î¦s¨úÀô¹ÒÅܼƪº¶¶§Ç

1.Autoexec.bat
2.¨t²ÎÅܼÆ
3.¨Ï¥ÎªÌÅܼÆ
¤]´N¬O»¡¡A¬Û¦PÅܼƦWºÙ¦P®É¸g¥Ñ¤W­z¤TºØ¤è¦¡³]©w¤§«á¡A
¦b¡y¨Ï¥ÎªÌÅܼơz©Ò³]©wªºÅܼƭȡA·|»\¹L¦b¡y¨t²ÎÅܼơz©Î¡yAutoexec.bat¡z©Ò³]©wªº­È¡F
¦Ó¦b¡y¨t²ÎÅܼơz©Ò³]©wªº­È¡A·|»\¹L¦b¡yAutoexec.bat¡z©Ò³]©wªº­È¡C

Windows¨t²Î¤º«Øªº±`¨£Àô¹ÒÅܼÆ

¥H¤UÀô¹ÒÅܼƥi¥H¦b¡yÀÉ®×Á`ºÞ¡z¨Ï¥Î¡A©Î¦bDOSµøµ¡¥Hecho«ü¥OÅã¥Ü¨ä­È¡F
%SystemDrive%¡G¨t²ÎºÏºÐ¾÷¡A¹w³]¬OC:
%SystemRoot%¡G¨t²Î®Ú¥Ø¿ý¡A¹w³]¬OC:\WINNT©ÎC:\WINDOWS
%SystemDirectory%¡G¨t²Î¥Ø¿ý¡A¹w³]¬OC:\WINNT\System32©ÎC:\WINDOWS\System32
%WinDir%¡GWindows¥Ø¿ý¡A¹w³]¬OC:\WINNT©ÎC:\WINDOWS
%ProgramFiles%¡GÀ³¥Îµ{¦¡¥Ø¿ý¡A¹w³]¬OC:\Program Files
%Temp%¡B%Tmp%¡G¼È¦sÀɥؿý %HomeDrive%¡G¨Ï¥ÎªÌ¥Ø¿ýªººÏºÐ¾÷
%HomePath%¡G¨Ï¥ÎªÌ®a¥Ø¿ý

¥H¤UªºÀô¹ÒÅܼƥu¯à¦bDOSµøµ¡¥Hecho«ü¥OÅã¥Ü¨ä­È:
%OS%¡G§@·~¨t²Î¦WºÙ¡A¨ä­È©T©w¬°Windows_NT
%UserDomain%¡G¥]§t¨Ï¥ÎªÌ±b¸¹ªººô°ì¦WºÙ¡A©ÎªÌ¹q¸£¦WºÙ
%UserName%¡G¨Ï¥ÎªÌ±b¸¹¦WºÙ

²³æªºÀ³¥Î

·Q§Ö³t¤Á´«¨ì¼È¦sÀɥؿý¡AµM«á§R°£¸Ì­±ªº©U§£Àɮ׶ܡH¡]³Ì¦n¬O¦b¶}¾÷¤§ªì¡^
¥H¤W­z¤è¦¡±N%Temp%©Î%Tmp%¿é¤J¨ì¡yÀÉ®×Á`ºÞ¡zªº¡yºô§}¡z¦C¡A§Y¥i¤Á´«¨ì¼È¦sÀɥؿý¡A±µµÛ´N¯à§R°£¸Ì­±ªºÀɮפF¡C

        ÀR«ä¦Û¦b : ¤Hªº¤ß¦a¬O¤@²¥¥Ð¡A¤g¦a¨S¦³¼½¤U¦nºØ¤l¡A¤]ªø¤£¥X¦nªºªG¹ê¡C -
ªð¦^¦Cªí ¤W¤@¥DÃD