{"id":902,"date":"2013-11-05T09:23:25","date_gmt":"2013-11-05T09:23:25","guid":{"rendered":"http:\/\/www.isunshare.com\/blog\/?p=902"},"modified":"2023-04-17T09:44:44","modified_gmt":"2023-04-17T09:44:44","slug":"detailed-explanation-for-pecmd-in-winpe-pecmd-ini-file-configuration-2","status":"publish","type":"post","link":"https:\/\/www.isunshare.com\/blog\/detailed-explanation-for-pecmd-in-winpe-pecmd-ini-file-configuration-2\/","title":{"rendered":"Detailed Explanation of PECMD in WinPE&#8212;- PECMD.INI File Configuration (2)"},"content":{"rendered":"<p>[IFEX]<br \/>\nFormat : IFEX &lt; condition &gt;, [ Command 1 ] [ ! Command 2 ]<br \/>\nFunction: According to whether the conditional expression is established, execute command 1 if it is established, while execute command 2 if it is not.<br \/>\nParameters:<br \/>\n\u25a0 Condition: judgment for [ available memory ], [ disk free space ], [ key ], [ numeric variable ] or [ file directory ]<br \/>\n\u25a0 Available memory: MEM &lt; comparison operators &gt; value<br \/>\n\u25a0 Disk free space: R: \\ &lt; comparison operator &gt; value. \u201cR:\u201d represents the drive letter .<br \/>\n\u25a0 Key: KEY &lt; comparison operator &gt; value<br \/>\n\u25a0 File directory: file directory name. Wildcards can be used.<br \/>\n\u25a0 Numeric variable: $%numeric variable name%&lt; comparison operator &gt; numerical value or numeric variable name. The numeric variable is a variable set by CALC or ENVI assignment.<br \/>\n\u25a0Comparison operators: The comparison operators include &#8220;&lt;&#8221; , &#8220;&gt;&#8221; and &#8220;=&#8221; which respectively represents &#8221; less than&#8221; , &#8220;greater than &#8221; and &#8221; equal &#8220;.<br \/>\n\u25a0 Numerical value: values for comparison. The unit of disk and memory is MB. And the key value is the key code.<br \/>\nExample:<br \/>\n\u25c6 IFEX KEY = 17, TEAM TEXT search fonts | FONT \\ WINDOWS! TEAM TEXT install fonts | FONT% CurDrv% \\ external program \\ FONT<br \/>\n\u25c6 IFEX C: \\ Windows,! MESS directory C: \\ Windows not exist, \\ n please click [ OK ] . @ directory check # OK<br \/>\nRemarks :<br \/>\n\u203b This command is very powerful and complex. It can be used by nesting IFEX or FIND, to judge multiple conditions. The function of FIND is similar to this command\u2019s.<br \/>\n\u203b The &#8221; , &#8221; after &lt; conditional expression&gt; can be replaced by &#8221; * &#8220;.<br \/>\n\u203b When this command is nesting IFEX or FIND command, the nested command can not use the &#8221; ! &#8221; separator.<br \/>\n\u203b When the IFEX command is used to detect keys, if user presses keys of &#8216;A&#8217; ~ &#8216;Z&#8217; or &#8216;0 &#8216; ~ &#8216;9 &#8216;, the key result will be stored in the %PressKey%.<br \/>\n\u203b When the command is used to judge the variables, all variables should be processed according to double data type. ( Up to four decimal places can be reserved.)<\/p>\n<p>[IMAG]<br \/>\nFormat : IMAG &lt; picture box name &gt;, [ picture box shape ], [ image filename ]<br \/>\nFunction: Establish a picture box in a window defined by _SUB command.<br \/>\nParameters:<br \/>\n\u25a0 Picture box name : string. The picture box name should be unique, and can not be same as other controls names or environment variables names.<br \/>\n\u25a0 Picture box shape: Picture box\u2019s size and location. Its format is &lt;LTWH&gt;, in which L stands for Left, T for Top, W for Width, H for Hight. And all of them are numerical values.<br \/>\n\u25a0 Image file name: Image files ( all image files supported by Windows) will be displayed in the specified picture boxes.<br \/>\nExample:<br \/>\n\u25c6 IMAG Image1, L8T380W140H70,%CurDir% \\ logo.gif<br \/>\nRemarks :<br \/>\n\u203b IMAG command must be located between _SUB command and _END command. IMAG command placed at any other locations is invalid. Please refer to descriptions of\u00a0 _SUB and CALL commands.<br \/>\n\u203b Because PECMD.EXE is script interpreter, so it is not recommended to load the large size image file. Otherwise, the display will be slow.<\/p>\n<p>[INIT]<br \/>\nFormat : INIT [C] [I] [K] [U]<br \/>\nFunction: Perform basic initialization, register Windows shell, initialize user folders and environment variables, install the keyboard hook, and create the following directories:<br \/>\nFavorites, Programs, Desktop, SendTo, StartMenu, Personal, Startup, QuickLaunch<br \/>\nParameters:<br \/>\n\u25a0 Parameter &#8220;C&#8221; indicates writing the drive letter into environment variable; parameter &#8220;I&#8221; means installing some functions of PECMD in the tray icon menu.<br \/>\n\u25a0 Parameter &#8220;K&#8221; indicates executing INIT command to immediately install low-level keyboard hook. Otherwise, install low-level keyboard hook after loading SHELL.<br \/>\n\u25a0 Parameter &#8220;U&#8221; means writing the USB letter into environment variable. (The function is not perfect.)<br \/>\nExample:<br \/>\n\u25c6 INIT<br \/>\n\u25c6 INIT C<br \/>\n\u25c6 INIT CH<br \/>\n\u25c6 INIT CIK<br \/>\n\u25c6 INIT CIKU<br \/>\nRemarks :<br \/>\n\u203b After executing INIT command, perform the SHEL to load the specified SHELL. Then a minimized WinPE can be booted.<br \/>\n\u203b Make sure that there is writable space in the partition where %USERPROFILE% is before executing INIT command. Otherwise, INIT command can not complete the work.<br \/>\n\u203b With parameter &#8220;C&#8221;, the drive letter is stored in the environment variables starting with CDROM. (These environment variables will take effect after restarting and refreshing.)<br \/>\n\u203b Parameter &#8220;K&#8221; indicates instantly installing the keyboard hook, taking charge of Ctrl + Alt + Del, and calling out Task Manager.<br \/>\n\u203b With parameter &#8220;U&#8221;, USB drive letter is stored in the environment variables starting with USB. (These environment variables will take effect after restarting and refreshing.)<br \/>\n\u203b The public offering WinPE INIT command is not recommended to have \u201cK\u201d parameter. This command can not be used in the command line. It can only be used in the configuration file.<\/p>\n<p>[ITEM]<br \/>\nFormat : ITEM &lt; button name &gt;, &lt; button shape &gt;, [ button title ], [ button event ], [ button icon ], [ button state ]<br \/>\nFunction: Establish a button in a window defined by _SUB command.<br \/>\nParameters:<br \/>\n\u25a0 Button name: string. The button name should be unique, and can not be the same as other controls names or environment variables names.<br \/>\n\u25a0 Button shape: button\u2019s location and size. Its format is &lt;LTWH&gt;, in which L stands for Left, T for Top, W for Width, H for Hight. And all of them are numerical values.<br \/>\n\u25a0 Button title: text on the button, used for describing the button&#8217;s function or executing command.<br \/>\n\u25a0 Button event: the command executed by clicking the button. It must be a valid command supported by PECMD.<br \/>\n\u25a0 Button icon: the icon displayed on the button. Its format is &lt; icon file name # ID&gt;, icon size = button height &#8211; 6.<br \/>\n\u25a0 Button state: number. If the default value is 0, it indicates that the button is available button; if the value is non-zero, it means that the button is gray unavailable button.<br \/>\nExample:<br \/>\n\u25c6 ITEM Button3, L32T108W300H54, resource manager, EXEC explorer.exe, %SystemRoot% \\ explorer.exe<br \/>\nRemarks :<br \/>\n\u203b ITEM command must be located between _SUB command and _END command. ITEM command placed at any other locations is invalid. Please refer to the illustrations of\u00a0 _SUB and CALL commands. http:\/\/www.dabaicai.com\/<br \/>\n\u203b To set the text on the button, you can use &#8220;ENVI @ button name = button text &#8220;. Please make reference to the explanation of ENVI command.<br \/>\n\u203b Use &#8220;ENVI @ button name. Enable = value &#8221; to set the edit box\u2019s available state. 0 stands for unavailable state, while non-zero value represents available state.<\/p>\n<p>[KILL]<br \/>\nFormat : KILL [[&lt;\\&gt; window title ] | [ process name ] ]<br \/>\nFunction: Close the window of specified title or forcefully terminate specified process<br \/>\nParameters:<br \/>\n\u25a0 The leading character &#8221; \\ &#8221; indicates closing the window of specified title. If the window title is omitted, the window defined by _SUB command will be closed.<br \/>\n\u25a0 Omitting the leading character &#8221; \\ &#8221; indicates ending the process of the specified name (EXE filename, no path). If the process name is omitted, the PECMD\u2019s parent process will be terminated.<br \/>\nExample:<br \/>\n\u25c6 KILL WinLogon.EXE<br \/>\n\u25c6 KILL \\ Calculator<br \/>\nRemarks :<br \/>\n\u203b Process name without window title should be ended up with process name.<br \/>\n\u203b When ending the process, all processes matching with the process name will be terminated.<\/p>\n<p>[LABE]<br \/>\nFormat : LABE &lt; text label name &gt;, &lt; text label shape &gt;, [ text label content ]<br \/>\nFunction: Establish a static text label in a window defined by _SUB command.<br \/>\nParameters:<br \/>\n\u25a0 Label name : string. Label name should be unique, and can not be same as other controls names or environment variables names.<br \/>\n\u25a0 Label shape: label\u2019s location and size. Its format is &lt;LTWH&gt;, in which L stands for Left, T for Top, W for Width, H for Hight. And all of them are numerical values.<br \/>\n\u25a0 Label content: string; text displayed by the label, supporting multiple lines display. Use &#8220;\\ n&#8221; between lines.<br \/>\nExample:<br \/>\n\u25c6 LABE Label1, L32T280W128H48, please click the &#8220;Open&#8221; button to browse the file.<br \/>\nRemarks :<br \/>\n\u203b LABE must be located between _SUB command and _END command. LABE command placed at any other location is invalid. Please refer to the introductions of\u00a0 _SUB and CALL commands.<br \/>\n\u203b To set the text on the label, you can use the &#8220;ENVI @label name = label text&#8221;. Please make reference to the description of ENVI command.<br \/>\n[LINK]<br \/>\nFormat : LINK [!] &lt; shortcut path &gt;, &lt; target path &gt;, [ operating parameters ], [ icon path [ # icon index ] ], [ target remark ], [ initial position ]<br \/>\nFunction : Create a shortcut.<br \/>\nParameters:<br \/>\n\u25a0 Shortcut : Specify the path of a shortcut to be generated. The &#8220;. LNK&#8221; extension name is not needed.<br \/>\n\u25a0 Target path: Specify a shortcut\u2019s target file directory (available relative path) . If the target does not exist, it will not create a shortcut.<br \/>\n\u25a0 Operating parameters: target program\u2019s operating parameters.<br \/>\n\u25a0 Icon path: shortcut icon path.<br \/>\n\u25a0 Icon index: the serial number of a shortcut icon in the file resources. 0 stands for the first one, while nothing filled means default.<br \/>\n\u25a0 Icon remarks: strings, description for the target program or directory.<br \/>\n\u25a0 Initial position: the working directory commanded by the target program.<br \/>\nExample:<br \/>\n\u25c6 LINK!% Desktop% \\ broadband connection, RASPPPOE.CMD, RASDIAL.DLL # 19<br \/>\nRemarks :<br \/>\n\u203b Leading character &#8221; ! &#8221; indicates starting up a program in the minimizing form, and can be used to minimize command windows when executing batch files.<\/p>\n<p>[LIST]<br \/>\nFormat : LIST &lt; combo box name &gt;, &lt; combo box shape &gt;, &lt; combo box content &gt;, [ combo box event ], [ default selected entry ]<br \/>\nFunction: Establish a combo box in the window defined by _SUB command.<br \/>\nParameters:<br \/>\n\u25a0 Combo box name: string. The combo box name should be exclusive, and can not be same as other controls names or environment variables names.<br \/>\n\u25a0 Combo box shape: combo box\u2019s position and size. Its format is &lt;LTWH&gt;, in which L stands for Left, T for Top, W for Width, H for Hight. And all of them are numerical values.<br \/>\n\u25a0 Combo box content : entries to be selected in the combo box. Use &#8220;|&#8221; between the entries.<br \/>\n\u25a0 Combo box event: the command to be executed when changes occur in the entries for selection of the combo box. It must be a valid command supported by PECMD.<br \/>\n\u25a0 Default selected entries: Initialize the drop-down list box and set the selected entry.<br \/>\nExample:<br \/>\n\u25c6 LIST List1, L200T360W128H32, EXPLORER | XPLORER2 | CMD, ENVI @ Label1 =% List1%, EXPLORER<br \/>\nRemarks :<br \/>\n\u203b LIST command must be located between _SUB command and _END command. LIST command placed at any other location is invalid. Please refer to the descriptions of\u00a0 _SUB and CALL commands.<br \/>\n\u203b The environment variable, % environment variable name%, is the selected entry ( string ) in the combo box.<br \/>\n\u203b Use &#8220;ENVI @combo box name. Enable = numerical value &#8221; to set the edit box\u2019s available state. 0 means unavailable state, while non-zero value represents available state.<\/p>\n<p>[LOAD]<br \/>\nFormat : LOAD &lt; file path &gt;<br \/>\nFunction: Run the commands in the configuration file in order.<br \/>\nParameters:<br \/>\n\u25a0 Specified file name ( including the path; supporting environment variables)<br \/>\nExample:<br \/>\n\u25c6 LOAD \\ external program \\ PECMD.INI<br \/>\nRemarks :<br \/>\n\u203b Each command is in a single line. The main process\u2019s orders is executed sequentially. Incorrect command or an empty line is negligible.<br \/>\n\u203b It supports text files of ANSI and UNICODE formats. UNICODE format text file is recommended to use.<br \/>\n\u203b Configuration file supports whole-line comments and after-line comments. It is suggested to use &#8221; ` &#8221; ( the character below the Esc key) as a comment starting.<br \/>\n\u203b In the configuration file, use the environment variable &#8220;%CurDrv%&#8221; to indicate the current drive letter.<br \/>\n\u203b If the first character of the file path is &#8221; \\ &#8220;, files in the specified directory of all disks will be searched. &#8220;LOAD \\ MyWinPE \\ PECMD.INI&#8221; is an example here.<br \/>\n\u203b The configuration file directory is set as the current directory. Then when creating a shortcut, the shortcut\u2019s target path can use relative path.<br \/>\n\u203b Regarding to other information, please refer to the illustration of MAIN command.<\/p>\n<p>[LOGO]<br \/>\nFormat : LOGO [[# background color ] | [ image file ] ], [ position and size ]<br \/>\nFunction : Set or close the login screen.<br \/>\nParameters:<br \/>\n\u25a0 Background color: numerical values. There must be a leading character &#8221; # &#8221; when setting the background color. If the color set is invalid, the default color in the registry will be used.<br \/>\n\u25a0 Image files : supporting BMP \/ JPG \/ PNG \/ GIF format, needing the support of GDI+. Only choose one between the background color and the image file.<br \/>\n\u25a0 Position and size : LOGO window\u2019s position and size. Its format is &lt;LTWH&gt;, in which L stands for Left, T for Top, W for Width, H for Hight. And all of them are numerical values.<br \/>\n\u25a0 If there are no parameters, turn off the splash screen ( fade out ).<br \/>\nExample:<br \/>\n\u25c6 LOGO% SystemRoot% \\ LOGON.JPG<br \/>\n\u25c6 LOGO # 0xFF0000, L100T100W300H200<br \/>\nRemarks :<br \/>\n\u203b This command is executed with non-blocking mode. After finishing this command , the next command will be executed at once.<br \/>\n\u203b This command can only be used in the configuration file. If it is used in the command line, the program exits immediately, so the result can not be saw.<br \/>\n\u203b If the &#8220;LT&#8221; is omitted, the window is centered; If the &#8220;WH&#8221; is omitted, the window is\u00a0 full-screen size; If \u201cLTWH\u201d is omitted, the window is a full screen one.<br \/>\n\u203b Before the end of the configuration file, a &#8220;LOGO&#8221; command without parameters must be called once so as to close the splash screen.<br \/>\n\u203b When booting WinPE, it is recommended to use full screen window ( position and size ). The use of a LOGO image requires large LOGO memory.<\/p>\n<p>[LOGS]<br \/>\nFormat : LOGS [ file path ] , [ numerical value ]<br \/>\nFunction: Enables logs so as to record the executing results of each command, and help users verify the correctness of the configuration file.<br \/>\nParameters:<br \/>\n\u25a0 File path: the log file name, including the path.<br \/>\n\u25a0 Numerical value: the memory space (unit is KB) applied for the log file. The more log records are, the more memory space is needed. If it is omitted, the default value, 16K, is applied.<br \/>\nExample:<br \/>\n\u25c6 LOGS% SystemRoot% \\ PECMD.LOG<br \/>\nRemarks :<br \/>\n\u203b Before the end of the configuration file, a &#8220;LOGO&#8221; command without parameters must be called once so as to close the splash screen. (make sure the log is written in file)<br \/>\n\u203b This command can not be used in the command line. (It must be used in the configuration file.)<br \/>\n\u203b It is not recommended to enable log file in public offering WinPE.<br \/>\n[LPOS]<br \/>\nFormat : LPOS &lt; variable name &gt; &lt;= &gt; &lt; string &gt;, &lt; characters &gt;, &lt; value &gt;<br \/>\nFunction: Return to the specified character\u2019s position where it appears from the left of the &#8221; string&#8221;.<br \/>\nParameters:<br \/>\n\u25a0 Variable name: variable name used for saving the command result<br \/>\n\u25a0 String: string to be detected. Its length can not exceed 2K.<br \/>\n\u25a0 Characters: characters to be detected. They are not case-insensitive.<br \/>\n\u25a0 Value: Specify the detected characters\u2019 appearance number.<br \/>\nExample:<br \/>\n\u25c6 LPOS iPos = 123A56 | 1234A6 | abcdef, a, 2<br \/>\n\u25c6 LPOS iPos = 123A56 | 1234A6 | abcdef, a, 3<br \/>\nRemarks :<br \/>\n\u203b When the &#8220;value&#8221; is less than 1, it is returned to the rightmost detected character\u2019s position. For instance, the result of the above example is 15. If the return result is 0, it means \u201cnot found\u201d.<br \/>\n\u203b This command is processed according to Unicode string. The return value of example 1 is 12, and that of example 2 is 15. ( Its result is the same as the result when the value is 0.)<\/p>\n<p>[LSTR]<br \/>\nFormat : LSTR &lt; variable name &gt; &lt;= &gt; &lt; string &gt;, &lt;number &gt;<br \/>\nFunction: Intercept characters of specified number from the left of specified &#8220;string&#8221;, and return the result to the variable with assigned name.<br \/>\nParameters:<br \/>\n\u25a0 Variable name: variable name used for saving command result<br \/>\n\u25a0 String: source string. Its length can not exceed 2K.<br \/>\n\u25a0 Number: Specify the number of intercepting characters.<br \/>\nExample:<br \/>\n\u25c6 LSTR aStr = 1234567890,2<br \/>\n\u25c6 LSTR aStr = 1234567890,5<br \/>\nRemarks :<br \/>\n\u203b When the &#8220;value&#8221; is less than 1 or exceeds the length of the source string, the result is the entire source string ( equivalent to string copy ).<br \/>\n\u203b This command is processed according to Unicode strings. The return value of example 1 is &#8220;12&#8221; and that of example 2 is &#8220;12345 &#8220;.<\/p>\n<p>[MAIN]<br \/>\nFormat : MAIN [ file path ]<br \/>\nFunction : Initialize the desktop, take over Ctrl + Alt + Del, and create a new process to execute LOAD function .<br \/>\nParameters:<br \/>\n\u25a0 Specified initialization configuration file path<br \/>\nExample:<br \/>\n\u25c6 MAIN %SystemRoot% \\ PECMD \\ PECMD.INI<br \/>\nRemarks :<br \/>\n\u203b After MAIN command creates a LOAD process and executes the LOAD function, it will stay in the memory, install key hook, and mount &#8220;ExitWindowsEx&#8221; function.<br \/>\n\u203b PECMD\u2019s stay takes up larger memory. You can use the PECMD\u2019s LAOD function, while the MAIN function is replaced by PELOGON.EXE.<br \/>\n\u203b After LOAD command completes loading file function, it will automatically exit from the memory. For other information, please make reference to the illustration of the LOAD command.<\/p>\n<p>[MD5C]<br \/>\nFormat : MD5C [ file name | $ string ], [ variable name ]<br \/>\nFunction: Calculate MD5 check code of file or string, and use it for setting or verifying the MD5 verification of WinPE login password.<br \/>\nParameters:<br \/>\n\u25a0 File name: the full name of the file whose MD5 check code is to be calculated; String: the string whose MD5 check code is to be calculated.<br \/>\n\u25a0 The leading character &#8221; $&#8221;: It means the thing to be calculated is the string\u2019s MD5. If the first character of the string is &#8220;$&#8221;, please add another &#8220;$&#8221; at the beginning of the string.<br \/>\n\u25a0 Variable name: variable name used to save the calculated result.<br \/>\nExample:<br \/>\n\u25c6 MD5C% SystemRoot% \\ System32 \\ UserInit.EXE, UserInitMD5<br \/>\n\u25c6 MD5C $ Lxl1638, PassWordMD5<br \/>\nRemarks :<br \/>\n\u203b When using MD5C command to calculate string\u2019s MD5 check code, the string\u2019s number of character is limited within 256. ( The character &#8220;,&#8221; can not be included.)<br \/>\n\u203b File name can not contain \u201c,\u201d character. The system exclusive file\u2019s MD5 check code is &#8220;d41d8cd98f00b204e9800998ecf8427e&#8221; or all &#8220;0&#8221;.<br \/>\n\u203b The verified string can include Chinese and English letters, and they are case sensitive.<br \/>\n\u203b If the variable name is given, MD5C command will save the calculation result to the specified variable. Example 2 can be referenced through the environment variable %PassWordMD5%.<br \/>\n\u203b If the variable name is omitted, MD5C command\u2019s calculation result will be displayed in the message window, and will also be saved to a paste board.<\/p>\n<p>[MEMO]<br \/>\nFormat : MEMO &lt; edit box name &gt;, &lt; edit box shape &gt;, [ edit box content ] , [ target file name ], [ edit box type ]<br \/>\nFunction: Create a multiple-line text edit box in the window defined by _SUB command. Parameters:<br \/>\n\u25a0 Edit box name: string. The edit box name should be unique, and can not be same as other controls names or environment variables names.<br \/>\n\u25a0 Edit box shape: edit box\u2019s position and size. Its format is &lt;LTWH&gt;, in which L stands for Left, T for Top, W for Width, H for Hight. And all of them are numerical values.<br \/>\n\u25a0 Edit box content: the content filled when initializing the edit box, supporting multiple lines text. Use &#8220;\\ n&#8221; between lines to indicate line break. And the total length must be less than 1K.<br \/>\n\u25a0 Target file name : Specified text file name. The content of multiple-line text edit box is loaded by the file.<br \/>\n\u25a0 Edit box type: numeric number. Default, omission or 0 means that it is an editable multiple-line text edit box, while non-zero value indicates that it is a read-only one.<br \/>\nExample:<br \/>\n\u25c6 MEMO Memo1, L304T268W280H88,,%CurDir% \\ Readme.TXT, 0<br \/>\nRemarks :<br \/>\n\u203b MEMO command must be located between _SUB command and _END command. MEMO command placed at any other location is invalid. Please refer to the introductions of\u00a0 _SUB and CALL commands.<br \/>\n\u203b If the &#8220;edit box content &#8221; is not empty, the &#8221; target file name &#8221; will be ignored. If it is empty, the specified content of &#8221; target file name &#8221; will be loaded. Overlong &#8221; edit box content &#8221; can connect as a new string variable through environment variable assignment, which makes it easy to read in the Notepad.<br \/>\n\u203b Use &#8220;ENVI @edit box name. Enable = numerical value&#8221; to set the edit box available state. 0 represents unavailable state, while non-zero value stands for available state.<br \/>\n\u203b Use &#8220;ENVI @edit box name. ReadOnly =numerical value &#8221; to set the edit box read-only status. 0 means non-read-only status, non-zero value represents read-only status.<br \/>\n[MENU]<br \/>\nFormat : MENU &lt; menu item name &gt;, [ menu item title ], [ menu item event ], [ menu item state ]<br \/>\nFunction: Add a menu in a custom tray icon menu.<br \/>\nParameters:<br \/>\n\u25a0 Menu item name: string. Apart from the separation line, the menu item name should be unique, and can not be same as other controls names or environment variables names. When the menu item name or the first character of the menu item name is &#8221; &#8211; &#8220;, it indicates separation line. Otherwise, it means normal menu.<br \/>\n\u25a0 Menu item title: the text on the menu item, used for describing the function or description of the menu item.<br \/>\n\u25a0 Menu item event: The command is executed by clicking the menu item. It must be a valid command supported by PECMD.<br \/>\n\u25a0 Menu item status: The default value is 0 which means available state, while non-zero value stands for gray unavailable status.<br \/>\nExample:<br \/>\n\u25c6MENU Menu2, resolution 1024X768 color 32-bit refresh rate 85, DISP W1024H768B32F85<br \/>\n\u25c6 MENU &#8211;<br \/>\nRemarks :<br \/>\n\u203b MENU command must be located between _SUB command and _END command. MENU command placed at any other location is invalid. Please refer to the descriptions of\u00a0 _SUB and CALL commands.<br \/>\n\u203b During the period of running, the support to modify the menu item title is temporarily not provided. That is, it can not use environment variable %menu item name% to refer to the menu item title, nor support using &#8220;ENVI @ menu item name &#8221; to set or modify the menu item title.<br \/>\n\u203b The icon of the tray icon menu is decided by the window title defined by the _SUB command. If it is omitted, the main icon of PECMD will be applied.<br \/>\n\u203b Use &#8220;ENVI @ menu item name. Enable = numerical value &#8221; to set the edit box available state. 0 means unavailable state, while non-zero value represents available status.<\/p>\n<p>[MESS]<br \/>\nFormat : MESS &lt; message window text &gt; &lt; @message window text title &gt; &lt;#message window type &gt; [ * automatic turn off time ( ms ) ] [ $ default option ]<br \/>\nFunction: Display a [ Yes \/ No ] selection message window or display a message window with [ OK ] button.<br \/>\nParameters:<br \/>\n\u25a0 &#8221; Message window text &#8221; supports multiple-line text and the &#8220;\\ n&#8221; should be used between lines to disconnect them. &#8220;Message window type &#8221; currently supports &#8220;YN&#8221; and &#8220;OK&#8221; types.<br \/>\n\u25a0 When the auto-off time is set as 0 or not set, the message window does not close automatically. The default option is represented by Y or N, such as $ Y or $ N.<br \/>\nExample:<br \/>\n\u25c6 MESS find insufficient physical memory, \\ n whether to set virtual memory? @ set virtual memory # YN * 10000 $ N<br \/>\nRemarks :<br \/>\n\u203b Users\u2019 selection result of &#8220;YN&#8221; type message window is stored in the environment variable %YESNO%. When[ YES ] is selected, the value of the environment variable % YESNO% is YES; when the window is closed because of timeout or [ No ] is selected, the value of the environment variable % YESNO% is NO. IFEX or FIND command can be used to judge the environment variable value.<br \/>\n\u203b When &#8220;YN&#8221; type message window omits the default choice parameters, the return value of auto-off is NO.<br \/>\n\u203b The &#8220;OK&#8221; type message window does not have return value. It only display the prompt message to users.<\/p>\n<p>[MOUN]<br \/>\nFormat : MOUN [!] [Wim file name ] , &lt;Mount target directory&gt; , [ image ID ], [WimFltr temporary working directory ]<br \/>\nFunction: Mount certain image of WIM file to specified directory or remove the mounted image file.<br \/>\nParameters:<br \/>\n\u25a0 Wim file name: Microsoft Windows Imaging Format (WIM) image format file.<br \/>\n\u25a0 Mount target directory: the directory which a WIM image file is mounted to.<br \/>\n\u25a0 Wim file image ID: the image ID in Wim file, represented by numerical value. When the mount image is read-only or the image ID is 1, it can be omitted.<br \/>\n\u25a0 WimFltr temporary directory: During the process of setting WimFltr temporary working directory, if it indicates mounting by RW way, this directory is recommended to set to hard disk.<br \/>\nExample:<br \/>\n\u25c6 MOUN% CurDrv% \\ external program \\ PROGRAMS.WIM,% ProgramFiles%, 1<br \/>\nRemarks :<br \/>\n\u203b File directory name supports environment variables explanation. When using FBWF command, it must be used after MOUN command.<br \/>\n\u203b If &#8221; \\ &#8221; is at the beginning of the file name, it means searching specified directory files of all partitions (including hidden partitions). e.g.: MOUN \\ MyPE \\ OP.WIM,% PF%, 1<br \/>\n\u203b The leading character &#8221; ! &#8221; indicates that after successfully mounting WIM in a hidden partition, a drive letter should be given to the hidden partition. e.g.: MOUN! \\ MyPE \\ OP.WIM,% PF%, 1<br \/>\n\u203b Omitting Wim file name means unmounting the image. If the image ID is non-zero value, it indicates saving the changes when unmounting the image. If the image ID is 0, it means not saving the changes.<\/p>\n<p>[MSTR]<br \/>\nFormat : MSTR &lt; variable name &gt; &lt;=&gt; &lt; string &gt;, &lt;location &gt;, &lt;length&gt;<br \/>\nFunction: Intercept the characters of specified length from the starting position of assigned &#8220;string&#8221; and return the result to the specified variable.<br \/>\nParameters:<br \/>\n\u25a0 Variable name: variable name used for saving command result.<br \/>\n\u25a0 String: source string. Its length can not exceed 2K.<br \/>\n\u25a0 Location: numerical value. Specify the starting position of the source string.<br \/>\n\u25a0 Length: numeric value, specifying the length of interception.<br \/>\nExample:<br \/>\n\u25c6 MSTR aStr = 1234567890,2,4<br \/>\n\u25c6 MSTR aStr = 1234567890,5,7<br \/>\nRemarks :<br \/>\n\u203b When the &#8220;position&#8221; value is less than 1, it is processed as 1. When the &#8221; length&#8221; value is less than 1 or exceeds the length of the source string, return all characters after the starting position.<br \/>\n\u203b This command is processed according to Unicode string. The return value of example 1 is &#8220;2345&#8221;, and that of example 2 is &#8220;567890&#8221;.<\/p>\n<p>[NAME]<br \/>\nFormat : NAME &lt; variable name &gt; &lt;= &gt; &lt; file name &gt;<br \/>\nFunction : Return the base name ( without directory and extension ) of the specified file name.<br \/>\nParameters:<br \/>\n\u25a0 Variable name: variable name used for saving command return value.<br \/>\n\u25a0 File name: detected legal file name<br \/>\nExample:<br \/>\n\u25c6 NAME aFileName = C: \\ WINDOWS \\ NOTEPAD.EXE<br \/>\n\u25c6 NAME aName =% CurDir% \\ Path1 \\ Path2 \\ FileName<br \/>\nRemarks :<br \/>\n\u203b When the specified file name is the partition&#8217;s root directory, the command\u2019s returns result is a null value.<br \/>\n\u203b The return result of example 1 is &#8220;NOTEPAD&#8221;, and that of example 2 is &#8220;FileName&#8221;.<br \/>\n[NUMK]<br \/>\nFormat : NUMK &lt;numerical value&gt;<br \/>\nFunction: Control the switching state of the small numeric keypad.<br \/>\nParameters:<br \/>\n\u25a0 When the value is 0, the state is off; When it is non-zero value, the status is open.<br \/>\nExample:<br \/>\n\u25c6 NUMK 1<br \/>\nRemarks :<br \/>\n\u203b The original SEND command can achieve the same function, but it is not very accurate. When NUMK is on, it will turn off by sending a button again.<\/p>\n<p>[PAGE]<br \/>\nFormat : PAGE &lt; page file path &gt; &lt; initial size &gt; [ Max ]<br \/>\nFunction : Set the page file ( virtual memory ).<br \/>\nParameters:<br \/>\n\u25a0 Specified path to the page file: It can only use path of DOS 8.3 format, such as &#8220;C: \\ PageFile.sys&#8221;.<br \/>\n\u25a0 The unit of initial size and maximum value is MB. When the max is omitted, it will automatically set \u201cmax = initial size\u201d.<br \/>\nExample:<br \/>\n\u25c6 PAGE C: \\ PAGEFILE.SYS 128 256<br \/>\nRemarks :<br \/>\n\u203b If the page file is set, the partition is not able to perform operations such as formatting and other operations.<br \/>\n\u203b When available memory is larger than initial size, the command will not set the page file. That is, defining the initial size can be a setting condition of page file.<br \/>\n\u203b This command has intelligent function. In other words, it will start searching from the partition where the page file name ( including the drive letter ) you defined is for eligible\u00a0\u00a0\u00a0 ( hard drives and capacity ) partition to set the page file, avoiding slow U-disk and removable hard disk. When booting with U disk or removable hard disk, the page file defined by the configuration file may be in the U disk or removable hard disk. Only after searching and qualified hard disk partition for setting page file cannot be found, can you use U disk or removable hard disk to set the page file.<br \/>\n[PATH]<br \/>\nFormat : PATH [@] [#] [ directory name ]<br \/>\nFunction: Operate directory, set the current working directory of PECMD.EXE, create a directory, or delete directory.<br \/>\nParameters:<br \/>\n\u25a0 Directory name (Containing environment variable is supported.)<br \/>\nExample:<br \/>\n\u25c6 PATH @% CurDrv% \\ external program or PATH %TEMP%<br \/>\nRemarks :<br \/>\n\u203b The leading character &#8220;@&#8221; indicates setting the current working directory of PECMD.EXE, facilitating EXEC, DEVI and other commands to use relative paths so as to shorten the length of command line.<br \/>\n\u203b The leading character &#8220;#&#8221; means deleting directory. Please note that this operation can also delete a homonymous file.<br \/>\n\u203b When the leading characters &#8220;@&#8221; and &#8220;#&#8221; are omitted, PATH is used to create a directory. ( It is able to build multi-level directory. )<br \/>\n\u203b It must be careful to use PATH command with the leading character &#8220;@&#8221; in the configuration file so as to avoid causing confusion.<br \/>\n\u203b When the parameter is empty, the PECMD.EXE defaulted current directory (%SystemRoot% \\ SYSTEM32) will be restored.<\/p>\n<p>[PBAR]<br \/>\nFormat : PBAR &lt; progress bar name &gt;, &lt; progress bar shape &gt;, [ progress bar schedule]<br \/>\nFunction: Build a progress bar in the window defined by _SUB command.<br \/>\nParameters:<br \/>\n\u25a0 Progress bar name: string. The progress bar name should be unique, and can not be same as other controls names or environment variables names.<br \/>\n\u25a0 Progress bar shape: progress bar\u2019s position and size. Its format is &lt;LTWH&gt;, in which L stands for Left, T for Top, W for Width, H for Hight. And all of them are numerical values.<br \/>\n\u25a0 Progress bar schedule: Value ( 1 to 100 ), initializing the schedule percentage of the progress bar. The default value is 0.<br \/>\nExample:<br \/>\n\u25c6 PBAR Pbar1, L360T11W428H16, 0<br \/>\nRemarks :<br \/>\n\u203b PBAR command must be located between _SUB command and _END command. PBAR command placed at any other location is invalid. Please refer to the descriptions of\u00a0 _SUB and CALL commands.<br \/>\n\u203b To set the progress bar schedule, you can use &#8220;ENVI @ progress bar name = numerical value&#8221;. Please make reference to the description of ENVI command. When the set value is less than 0, the progress bar will be hidden. The value greater than 100 will be ignored .<\/p>\n<p>[RADI]<br \/>\nFormat : RADI &lt; single marquee name &gt;, &lt; single marquee shape &gt;, [ single marquee title ], [ single marquee event ], [ single marquee state ], [ single marquee group ID]<br \/>\nFunction: Establish a single marquee control in the window defined by _SUB command.<br \/>\nParameters:<br \/>\n\u25a0 Single marquee name: string. It should be unique, and can not be same as other controls names or environment variables names.<br \/>\n\u25a0 Single marquee shape: single marquee\u2019s position and size. It is format is &lt;LTWH&gt;, in which L stands for Left, T for Top, W for Width, H for Hight. And all of them are numerical values.<br \/>\n\u25a0 Single marquee title: text on the single marquee, used to describe the single marquee\u2019s function or illustration.<br \/>\n\u25a0 Single marquee event: The command is executed by clicking the single marquee. It must be a valid command supported by PECMD command.<br \/>\n\u25a0 Single marquee status: numbers. 1 or -1 stands for checked state, 0, 2 or -2 for not checked state, and value less than 0 for gray unavailable state.<br \/>\n\u25a0 Single marquee group ID: numeric number. The default value is 0. You can divide multiple single marquees into groups, and select one from many in a group. Meanwhile, groups will not influence each other.<br \/>\nExample:<br \/>\n\u25c6 RADI RadioButton1, L32T314W100H20, uninstall WimShExt.DLL, ENVI @ Group1 =% RadioButton1%, 1,1<br \/>\nRemarks :<br \/>\n\u203b RADI command must be located between _SUB command and _END command. RADI command placed at any other location is invalid. Please refer to the explanations of\u00a0 _SUB and CALL commands.<br \/>\n\u203b To set a single marquee title, use &#8220;ENVI @ single marquee name = single marquee title &#8220;. Please refer to the illustration of ENVI command.<br \/>\n\u203b Use &#8220;ENVI @ single marquee name. Check = numeric value&#8221; to set the single marquee\u2019s available state. 0 represents non-checked state, while non-zero value stands for checked state.<br \/>\n\u203b Use &#8220;ENVI @single marquee name. Enable = numerical value&#8221; to set the single marquee\u2019s available state. 0 means disabled status, while non-zero value indicates available state.<\/p>\n<p>[RAMD]<br \/>\nFormat : RAMD [P percentage of available memory ] [L min ] [H max ]<br \/>\nFunction : Set the size of RamDisk<br \/>\nParameters:<br \/>\n\u25a0 The unit for maximum value and minimum value is MB.<br \/>\nExample:<br \/>\n\u25c6 RAMD P20 L32 H64<br \/>\nRemarks :<br \/>\n\u203b The three parameters can be used alone. For example, if RAMD P10 is used, it indicates that 10% of available memory is set as the size of RamDisk.<\/p>\n<p>[REGI]<br \/>\nFormat : REGI [ leading character ] &lt;HKLM|HKCU|HKCR|HKU|HKCC&gt; &lt;\\ subkey \\ &gt; { &lt;key name, variable name &gt; | [[ key name ] [ operator ] [ [ type character ] data value ] ] }<br \/>\nFunction: Read, set or delete the registry data.<br \/>\nParameters:<br \/>\n\u25a0 The leading characters &#8221; $&#8221;, &#8220;#&#8221; and &#8220;@&#8221; respectively denote reading type data of REG_SZ, REG_DWORD, REG_BINARY in the registry. If they are omitted, it means setting and deleting registry data. And the variable name (The default is RegDat.) is used to save the return value.<br \/>\n\u25a0 Subkey name: the full name of the registry in the selected ROOTKEY.<br \/>\n\u25a0 Key name: the key value name to be operated. If it is omitted, operate the default key. If the operator is &#8221; ! &#8221; and without &#8220;=&#8221;, it is used to delete the entire subkey.<br \/>\n\u25a0 Operator: Operator &#8221; ! &#8221; means deleting the entire subkey; operator &#8220;=&#8221; and without data indicates deletion; operator &#8220;=&#8221; and with data denotes setting data.<br \/>\n\u25a0 Type character: data type. If it is omitted, the data type is string; if it is &#8220;#&#8221;, the data type is REG_DWORD data type such as &#8220;# 0x20&#8221;; if it is &#8220;@&#8221;, the data type is REG_BINARY data type such as &#8221; @ 233490255 &#8220;.<br \/>\n\u25a0 Data value: string. A null value is represented by &#8221; &#8220;. REG_DWORD REG_BINARY data types support hexadecimal value.<br \/>\nExample:<br \/>\n\u25c6 REGI HKCU \\ SOFTWARE \\ WinCMD \\ Version = # 1200<br \/>\n\u25c6 REGI HKCR \\ lnkfile \\ IsShortcut = &#8220;&#8221;<br \/>\n\u25c6 REGI $ HKCU \\ Software \\ Microsoft \\ Windows \\ CurrentVersion \\ Explorer \\ Shell Folders \\ Cache, IECache<br \/>\nRemarks :<br \/>\n\u203b This command is very complex. Please carefully read the notes. Example 3 is to read the location of IE cache.<\/p>\n<p>[RPOS]<br \/>\nFormat : RPOS &lt; variable name &gt; &lt;= &gt; &lt; string &gt;, &lt;characters&gt;, &lt;value&gt;<br \/>\nFunction: Return to the specified character\u2019s location where it appears from the right of the \u201cstring\u201d.<br \/>\nParameters:<br \/>\n\u25a0 Variable name: variable name used for saving command result.<br \/>\n\u25a0 String: the string to be detected. Its length can not exceed 2K.<br \/>\n\u25a0 Character: the character to be detected. It is not case-insensitive.<br \/>\n\u25a0 Value: Specify the detected character\u2019s occurrence number.<br \/>\nExample:<br \/>\n\u25c6 RPOS iPos = 123A56 | 1234A6 | abcdef, a, 2<br \/>\n\u25c6 RPOS iPos = 123A56 | 1234A6 | abcdef, a, 3<br \/>\nRemarks :<br \/>\n\u203b When the &#8220;value&#8221; of less than 1, it is returned to the leftmost detected character\u2019s position. For instance, the result of the above example is 4. If the return result is 0, it means \u201cnot found\u201d.<br \/>\n\u203b This command is processed according to Unicode string. The return value of example 1 is 12, and that of example 2 is 4.<\/p>\n<p>[RSTR]<br \/>\nFormat : RSTR &lt; variable name &gt; &lt;= &gt; &lt; string &gt;, &lt;numeric value&gt;<br \/>\nFunction: Intercept characters of specified number from the right of the appointed string\u00a0 and return the result to the assigned variable name.<br \/>\nParameters:<br \/>\n\u25a0 Variable name: variable name used to save the command result.<br \/>\n\u25a0 String: source string. Its length can not exceed 2K.<br \/>\n\u25a0 Numeric value: Specify the number of intercepted characters.<br \/>\nExample:<br \/>\n\u25c6 RSTR aStr = 1234567890,2<br \/>\n\u25c6 RSTR aStr = 1234567890,5<br \/>\nRemarks :<br \/>\n\u203b When the &#8220;value&#8221; is less than 1 or exceeds the length of the source string, the return result is the entire source string ( equivalent to string copy ).<br \/>\n\u203b This command is processed according to Unicode string. The return value of example 1 is &#8220;90&#8221;, and that of example 2 is &#8221; 67890 &#8220;.<\/p>\n<p>[RUNS]<br \/>\nFormat : RUNS &lt; program command &gt; &lt;* |,&gt; &lt; starting item name &gt;<br \/>\nFunction: Set the starting item of Windows<br \/>\nParameters:<br \/>\n\u25a0 Program command includes EXE, CMD, BAT and other executable commands which can be with parameters. The startup item name is text.<br \/>\nExample:<br \/>\n\u25c6 RUNS PECMD.EXE EXEC!% CurDrv% \\ external program \\ DRIVER \\ STARTDRIVER.CMD, install driver.<br \/>\nRemarks :<br \/>\n\u203b The original REGI order can achieve the same functionality. But when using REGI command, long text is needed to make this functionality into a command.<br \/>\n\u203b The separators between program command and startup item name are right &#8220;*&#8221; and left &#8220;|&#8221;.\u00a0 http:\/\/www.dabaicai.com\/<br \/>\n\u203b This command can not be used in the command line and it can only be used in the configuration file.<\/p>\n<p>[SEND]<br \/>\nFormat : SEND &lt; key code 1 [_ | ^]&gt;, [ key code 2 ], [ key code 3 ] &#8230;<br \/>\nFunction : Simulate button.<br \/>\nParameters:<br \/>\n\u25a0 Virtual key code: VK_NUMLOCK is an example. Please refer to the relevant programming documentation. If the key code is ended with &#8221; _ &#8220;, only simulate key down; &#8220;^ &#8221; means only simulate key up. Otherwise, simulate down and up.<br \/>\nExample:<br \/>\n\u25c6 SEND 0x12_, 0x09_, 0x09 ^, 0x12 ^<br \/>\nRemarks :<br \/>\n\u203b The above example simulates Alt + Tab. Key code supports hexadecimal and decimal.<\/p>\n<p>[SERV]<br \/>\nFormat : SERV [!] &lt; service name &gt;<br \/>\nFunction : Start or stop service or driver program.<br \/>\nParameters:<br \/>\n\u25a0 Specified service name: The leading character &#8221; ! &#8221; means stopping a service. And without it indicates starting the service.<br \/>\nExample:<br \/>\n\u25c6 SERV FBWF<br \/>\nRemarks :<br \/>\n\u203b This command is used to start the FBWF service ( if you install it ), which can increase the system disk\u2019s writable space. Then PE can run on the disk.<\/p>\n<p>[SHEL]<br \/>\nFormat : SHEL &lt; file name ( including the path ) &gt; [ Password MD5 string ], [ number of retry ]<br \/>\nFunction: Load the specified SHELL and lock it.<br \/>\nParameters:<br \/>\n\u25a0 File name: SHELL file name ( including the path; environment variable can be used.).<br \/>\n\u25a0 Password: English letters and numbers. The password is case-sensitive and its maximum length is 12 characters.<br \/>\n\u25a0 If the password MD5 string is omitted, it will automatically log in. The default number of retry is 3.<br \/>\nExample:<br \/>\n\u25c6 SHEL% SystemRoot% \\ EXPLORER.EXE, e10adc3949ba59abbe56e057f20f883e, 5<br \/>\nRemarks :<br \/>\n\u203b This command\u2019s functionality is similar to EXEC $\u2019s. It can modify in-process shutdown code ( mount &#8220;ExitWindowsEx&#8221; function ).<br \/>\n\u203b This command also has the function of locking SHELL. When the SHELL is deleted, it will automatically load SHELL.<br \/>\n\u203b It is recommended to open LOGO command before opening the SHELL command with a login password .<br \/>\n\u203b Parameters of TEXT command after SHEL command may need reset.<br \/>\n\u203b SHEL command must be after HOTK command. Meanwhile, it can not be used in the command line, and can only be used in the configuration file.<\/p>\n<p>[SHOW]<br \/>\nFormat : SHOW [ hard disk number | identifier ] [ : partition number ], [ letter ]<br \/>\nFunction: Display the hidden partitions of removable hard disks or fixed one in the system, and assign drive letters to the partitions.<br \/>\nParameters:<br \/>\n\u25a0 Hard disk number: the hard disks in the computer. &#8220;0&#8221; means &#8220;hd0&#8221;; &#8220;1&#8221; indicates &#8220;hd1&#8221;; &#8220;2&#8221; indicates &#8220;hd2&#8221;, etc.<br \/>\n\u25a0 Identifier: identified used for representing hard disk type. The fixed hard disks are represented by &#8220;F&#8221;, while the removable hard disks are denoted by &#8220;R&#8221;. Between identifier or hard disk number, only one of them can be selected.<br \/>\n\u25a0 Partition number: &#8220;0&#8221; indicates all partitions which have not been assigned drive letter. &#8220;1&#8221; represents the first partition; &#8220;2&#8221; indicates the second partition; and so on.<br \/>\n\u25a0 Drive letter: Drive letter is represented by letter of &#8220;C ~ Z&#8221; ( without &#8220;:&#8221; ). If the letter is omitted or the drive letter is set unreasonably, PECMD.EXE will automatically assign drive letters.<br \/>\nExample:<br \/>\n\u25c6 SHOW 0:1, H<br \/>\n\u25c6 SHOW R: 1, U<br \/>\n\u25c6 SHOW F: 0<br \/>\n\u25c6 SHOW<br \/>\nRemarks :<br \/>\n\u203b Some models can identify removable hard disk after starting WinPE mobile hard disk, but do not assign drive letters to them. So SHOW command\u2019s &#8220;R&#8221; identifier can be used to allocate letters to removable hard disks. Example 2 means assigning drive letter &#8221; U: &#8221; to the first partition of removable hard disks.<br \/>\n\u203b Example 1 means assigning drive letter &#8220;H:&#8221; to &#8220;hidden partition 1 of hard disk 0&#8243;; Example 3 indicates automatically allocating letters to &#8221; all hidden partitions of fixed hard disk.<br \/>\n\u203b SUBJ command can be used to delete drive letters. When SHOW command cooperates with SUBJ command, they can load hidden partition\u2019s external program and keep the original hidden attribute of hidden partition.<\/p>\n<p>[SHUT]<br \/>\nFormat : SHUT [H | E | R | S]<br \/>\nFunction: Shut down or restart the computer and so forth.<br \/>\nParameters:<br \/>\n\u25a0 No parameters: The default is shutting down system.<br \/>\n\u25a0 Parameter &#8220;H&#8221;: Perform dormancy operation. It can only be used in normal system which supports dormancy ( It can be enabled in the control panel.).<br \/>\n\u25a0 Parameter &#8220;E&#8221;: Pop up drive before closing the system, and then turn off the system after 10 seconds.<br \/>\n\u25a0 Parameter &#8220;R&#8221;: Execute restart the system operation.<br \/>\n\u25a0 Parameter &#8220;S&#8221;: Perform suspend system operation. It can only be used in the normal system.<br \/>\nExample:<br \/>\n\u25c6 SHUT E<br \/>\n\u25c6 SHUT R<br \/>\n\u25c6 SHUT H<br \/>\n\u25c6 SHUT S<br \/>\nRemarks :<br \/>\n\u203b This command can be used in command line. Its feature is fast shutdown by which all data may not be saved.<\/p>\n<p>[SITE]<br \/>\nFormat : SITE &lt; file directory path &gt;, &lt; file directory attribute &gt;<br \/>\nFunction: Set or remove the file directory attribute. SITE command supports the four properties of A, H, R and S.<br \/>\nParameters:<br \/>\n\u25a0 Setting the attribute with the &#8221; +&#8221; and clear it with &#8220;-&#8220;. (A = ARCHIVE; H = HIDDEN; R = READONLY; S = SYSTEM)<br \/>\nExample:<br \/>\n\u25c6 SITE%SystemRoot% \\ System32 \\ PELOGON.EXE, + H + R<br \/>\nRemarks :<br \/>\n\u203b SITE command can set file attribute and directory property.<\/p>\n<p>[STRL]<br \/>\nFormat : STRL &lt; variable name &gt; &lt;=&gt; &lt; string &gt;<br \/>\nFunction: Returns specified string\u2019s length.<br \/>\nParameters:<br \/>\n\u25a0 Variable name: variable name used for saving command result.<br \/>\n\u25a0 String: string to be detected. Its length can not exceed 2K.<br \/>\nExample:<br \/>\n\u25c6 STRL iLen = 1234567890<br \/>\n\u25c6 STRL dLen = 12345<br \/>\nRemarks :<br \/>\n\u203b The return result of this command is the length of Unicode string. The return value of example 1 is 10, and that of example 2 is 5.<\/p>\n<p>[SUBJ]<br \/>\nFormat : SUBJ &lt; virtual drive &gt;, [ the path assigned to virtual drive ]<br \/>\nFunction: Associate the path with the drive number. The command is equivalent to SUBST command of CMD.<br \/>\nParameters:<br \/>\n\u25a0 If &#8221; the path assigned to virtual drive&#8221; is omitted, the specified virtual drive will be removed.<br \/>\nExample:<br \/>\n\u25c6 SUBJ B:, X: \\ PE_Tools<br \/>\nRemarks :<br \/>\n\u203b During the virtual process, the virtual drive must be non-existent. When deleting the virtual drive, the drive letter must be accurate. Otherwise, the physical drive may be removed.<\/p>\n<p>[TEAM]<br \/>\nFormat : TEAM [ command 1] [| command 2] [| command 3] &#8230; [| command n]<br \/>\nFunction: Execute the specified command group\u2019s each command in order.<br \/>\nParameters:<br \/>\n\u25a0 One or many commands: Use &#8220;|&#8221; between commands to separate multiple commands.<br \/>\nExample:<br \/>\n\u25c6 TEAM TEXT loading the desktop | LOGO | SHEL%SystemRoot% \\ EXPLORER.EXE | WAIT 3000<br \/>\nRemarks :<br \/>\n\u203b The command after TEAM command can not nest IFEX or FIND command.<\/p>\n<p>[TEMP]<br \/>\nFormat : TEMP &lt;[@] Delete | Setting&gt;<br \/>\nFunction: Clean up user temporary folder, or reset the location of user temporary folder.<br \/>\nParameters:<br \/>\n\u25a0 Delete means cleaning up temporary directory. The leading character \u201c@\u201d indicates direct cleaning up without user\u2019s confirmation. Setting denotes resetting the location of the temporary directory.<br \/>\nExample:<br \/>\n\u25c6 TEMP Delete<br \/>\nRemarks :<br \/>\n\u203b Do not use this command in the configuration file. It must be used by booting to the desktop. This command is to read temporary directory location from the registry.<\/p>\n<p>[TEXT]<br \/>\nFormat : TEXT [ text line 1] [\\ n] text line 2 [\\ n] text line 3 &#8230; ] [ # color ] [L left ] [T top ] [R right ] [B bottom ] [ $ font size ]<br \/>\nFunction: Display text in the login screen or desktop window.<br \/>\nParameters:<br \/>\n\u25a0 If the text is empty, remove the recently defined text in rectangular area. The default color is white; The default coordinate is roughly in the top left corner; The &#8220;*&#8221; at the end means that before the new text is displayed, the originally displayed text is not removed.<br \/>\nExample:<br \/>\n\u25c6 TEXT registering components &#8230;&#8230; # 0xFFDDDD L4 T720 R300 B768 $ 20<br \/>\nRemarks :<br \/>\n\u203b This command supports multiple-line display text. Use &#8220;\\ n&#8221; to indicate line break between text lines.<br \/>\n\u203b Font size: The default font size is 14 ( equivalent to Song typeface\u2019s small five font ).<br \/>\n\u203b The specified location [ left, top, right, bottom ] is related with the text length and font size.<br \/>\n\u203b If this command is used in the configuration file during the login process, the text will display in the login screen; If it is used in Windows after login, the text will display desktop window; If the text is empty, remove the recently defined text in rectangular area.<\/p>\n<p>[TIME]<br \/>\nFormat : TIME &lt; timer name &gt;, &lt; timer period &gt;, [ timer event ]<br \/>\nFunction: Build a timer control within the window defined by _SUB command.<br \/>\nParameters:<br \/>\n\u25a0 Timer name: string. It should be unique, and can not be same as other controls names environment variables names.<br \/>\n\u25a0 Timer period: numerical value. Its unit is ms. If the value is greater than 0, it indicates that the timer works immediately; If the value is 0, it means that the timer pauses working.<br \/>\n\u25a0 Timer event: The command is executed when triggering the timer. And it must be a valid command supported by PECMD command.<br \/>\nExample:<br \/>\n\u25c6 TIME Timer1, 10000, FILE% TEMP% \\ *. *<br \/>\nRemarks :<br \/>\n\u203b TIME command must be located between _SUB command and _END command. TIME at any other location is invalid. Please make reference to the descriptions of _SUB and CALL commands.<br \/>\n\u203b Environment variable, %timer name%, is the timer\u2019s working status. 0 represents \u201csuspend\u201d, non-zero value stands for \u201cstarted\u201d.<br \/>\n\u203b Use &#8220;ENVI @ timer name = 0&#8221; to suspend timer; Use &#8220;ENVI @ timer name = timer period( value )&#8221; to restart the timer.<\/p>\n<p>[TIPS]<br \/>\nFormat : TIPS [ prompt box title ], &lt; prompt box content &gt;, [ prompt box life ], [ icon style ID], [&lt;@ [A] prompt box location &gt; | [ tray bar icon ] ]<br \/>\nFunction: Display a bubble prompt box in the specified location or tray bar of a screen. If all parameters are omitted, it indicates removing invalid icons in tray bar.<br \/>\nParameters:<br \/>\n\u25a0 Prompt box title: string; text displayed at the prompt box title. It can not be longer than 64 characters, and the exceeding part is invalid.<br \/>\n\u25a0 Prompt box content: string; body content displayed at the prompt. It can not be longer than 256 characters. Meanwhile, &#8220;\\ n&#8221; can be used as line break.<br \/>\n\u25a0 Prompt box life: number, used for representing the prompt box\u2019s continuous display time( ms ). If it is omitted, the default is 10 seconds. And the longest display time is determined by the system.<br \/>\n\u25a0 Icon style ID: number. 0, the default value, stands for no icon; 1 for information icon; 2 for warning icon; 3 for error icon; 4 or value larger than 4 for tray icon.<br \/>\n\u25a0 Prompt box location: It must be with a leading character &#8220;@&#8221;, which represents displaying prompt box in specified location of the screen. The leading character &#8220;A&#8221; represents arrow type prompt box. If it is omitted, rectangular prompt box will display. The position is expressed by LxxTyy (xx and yy represents numbers.) And this parameter can not be used together with tray bar icon.<br \/>\n\u25a0 Tray bar icon: Its format is &#8221; file name # number&#8221;. When omitting the &#8220;file name&#8221;, use the specified icon in PECMD.EXE program resource.<br \/>\nExample:<br \/>\n\u25c6 TIPS title, content \\ n can branch \\ n line 3 , 5000,1 , # 1<br \/>\n\u25c6 TIPS title, content \\ n can branch \\ n line 3 , 5000,2, @ aL600T400<br \/>\nRemarks:<br \/>\n\u203b Tray bar bubble prompt box can continue to display after the end of PECMD.EXE. When the PECMD.EXE life is longer than the prompt box life, the PECMD.EXE will end the prompt box after the specified time. After the end of PECMD.EXE life, the still existing prompt box will be processed by the system or user.<br \/>\n\u203b The screen prompt box will end after the end of PECMD. So make sure that PECMD lifetime is slightly longer than prompt box\u2019s (WAIT command delay) .<\/p>\n<p>[UPNP]<br \/>\nFormat : UPNP [$] &lt; parameter &gt;<br \/>\nFunction: Perform the functionality of BartPE.EXE.<br \/>\nParameters:<br \/>\n\u25a0 The leading character &#8220;$&#8221; indicates displaying the execution interface of BartPE.EXE.<br \/>\n\u25a0 Parameter: BartPE.EXE\u2019s command line parameter.<br \/>\nExample:<br \/>\n\u25c6 UPNP-pnp<br \/>\n\u25c6 UPNP $-pnp<br \/>\nRemarks:<br \/>\n\u203b This command embeds execute code of new BartPE.EXE. Without BartPE.EXE file, WinPE can also implement the functionality of BartPE.EXE.<br \/>\n\u203b The command is executed in blocking mode. The command must be finished before executing the next command. Please pay attention to BartPE.EXE parameters and their case sensitivity.<\/p>\n<p>[USER]<br \/>\nFormat : USER &lt; user name &gt; &lt;* |,&gt; &lt; company name &gt;<br \/>\nFunction: Set the user name and company name in context menu properties of &#8220;My Computer&#8221;.<br \/>\nParameters:<br \/>\n\u25a0 Parameters are texts.<br \/>\nExample:<br \/>\n\u25c6 USER Laojiu*Worry-free Start Forum<br \/>\n\u25c6 USER Laojiu, Worry-free Start Forum<br \/>\nRemarks :<br \/>\n\u203b The separator between user name and company name must be &#8220;*&#8221; or &#8220;,&#8221;. This command can only be used in the configuration file.<\/p>\n<p>[WAIT]<br \/>\nFormat : WAIT [-] [ wait time ], [ quantitative change name ]<br \/>\nFunction: Pause or continue to execute the command after waiting for a specified time.<br \/>\nParameters:<br \/>\n\u25a0 Leading character &#8221; &#8211; &#8220;: Stop waiting when encountering any key during the specified wait time. Otherwise, wait until the end of waiting time.<br \/>\n\u25a0 Wait time: numerical value (unit is ms.). When the value is 0, suspend on encountering any key; Without keys, wait indefinitely ( equivalent to any key to continue ).<br \/>\n\u25a0 Quantitative change name: It is used to save keys\u2019 variables during wait time. The user&#8217;s key results will be saved in the specified variable.<br \/>\nExample:<br \/>\n\u25c6 WAIT 2000<br \/>\n\u25c6 WAIT 0, PKey<br \/>\nRemarks :<br \/>\n\u203b When the parameter is 0, pause. Press any key to continue. Do not continuously use pause functionality in short intervals, and it is recommended to use pause functionality only once. WAIT 0 can detect the user&#8217;s key of &#8216;A&#8217; ~ &#8216;Z&#8217; or &#8216;0 &#8216;~&#8217; 9 &#8216;. When omitting the variable name, the key result is stored in the environment variable %PressKey%.<\/p>\n<p>[WALL]<br \/>\nFormat : WALL &lt; wallpaper file name &gt;<br \/>\nFunction: Set wallpaper<br \/>\nParameters:<br \/>\n\u25a0 Wallpaper file name<br \/>\nExample:<br \/>\n\u25c6 WALL%CurDrv% \\ external program \\ WallPage.JPG<br \/>\nRemarks :<br \/>\n\u203b It supports environment variables and different formats\u2019 picture files. WALL command of setting wallpaper must be before SHEL command of loading the desktop.<br \/>\n\u203b This command can not be used in command line. It can only be used in the configuration file.<\/p>\n<p>&nbsp;<\/p>\n<p>Related Article:<\/p>\n<ul>\n<li><a title=\"Detailed Explanation for PECMD in WinPE\u2014-PECMD.INI File Configuration ( 1 )\" href=\"https:\/\/www.isunshare.com\/blog\/detailed-explanation-for-pecmd-in-winpe-pecmd-ini-file-configuration-1\/\">Detailed Explanation of PECMD in WinPE&#8212;- PECMD.INI File Configuration (1)<\/a><\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>[IFEX] Format : IFEX &lt; condition &gt;, [ Command 1 ] [ ! Command 2 ] Function: According&#8230;<\/p>\n","protected":false},"author":2,"featured_media":126377,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[52],"tags":[],"class_list":["post-902","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-windows-pe"],"_links":{"self":[{"href":"https:\/\/www.isunshare.com\/blog\/wp-json\/wp\/v2\/posts\/902","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.isunshare.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.isunshare.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.isunshare.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.isunshare.com\/blog\/wp-json\/wp\/v2\/comments?post=902"}],"version-history":[{"count":3,"href":"https:\/\/www.isunshare.com\/blog\/wp-json\/wp\/v2\/posts\/902\/revisions"}],"predecessor-version":[{"id":6706,"href":"https:\/\/www.isunshare.com\/blog\/wp-json\/wp\/v2\/posts\/902\/revisions\/6706"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.isunshare.com\/blog\/wp-json\/wp\/v2\/media\/126377"}],"wp:attachment":[{"href":"https:\/\/www.isunshare.com\/blog\/wp-json\/wp\/v2\/media?parent=902"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.isunshare.com\/blog\/wp-json\/wp\/v2\/categories?post=902"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.isunshare.com\/blog\/wp-json\/wp\/v2\/tags?post=902"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}