Add PreShellConfig docs

Homes32
2025-02-17 21:39:30 -06:00
parent f133802463
commit 8b368241b4

@@ -19,13 +19,15 @@ The PhoenixPE startup process consist of the following stages:
## PhoenixPE.au3
PhoenixPE.au3 is the loader script that runs on boot and is responsible for the entire PhoenixPE startup process. A skeleton config file is placed in the `%TargetDir%\System32` directory during build and the script is dynamically modified throughout the build process using PhoenixAPI script commands such as `AddShortcut`, `AddAutoRun`, `AddStartupConfig`, etc. **This base config file is not intended to be modified directly** unless you an experienced developer with very specific needs.
PhoenixPE.au3 is the loader script that runs on boot and is responsible for the entire PhoenixPE startup process. A skeleton script is placed in the `%TargetDir%\System32` directory during build and this script is dynamically modified throughout the build process using PhoenixAPI script commands such as `AddShortcut`, `AddAutoRun`, `AddStartupConfig`, etc. **The `PhoenixPE.au3` script is not intended to be modified directly** unless you an experienced developer with very specific needs.
## User Scripts
Advanced users may choose to include user scripts written in either AutoIt3 or PECMD format to be run on startup during the `PreShell` stage. A typical use case would be to create shortcuts, run a program, or add registry entries during the boot process.
Advanced users may choose to include user scripts written in either AutoIt3 or PECMD format to be run on startup. A typical use case would be to create shortcuts, run a program, or add registry entries during the boot process.
By placing a specifically named script in a pre-defined location these scripts will automatically be processed by the PhoenixPE loader.
### Pre-Defined Config files
By placing a specifically named script in a pre-defined location these scripts will automatically be processed by the PhoenixPE loader during the `PreShell` stage.
| Filename | Location | Description |
| --- | --- | --- |
@@ -40,9 +42,11 @@ By placing a specifically named script in a pre-defined location these scripts w
| PhoenixPE-UserConfig.wcz | `%TargetDir%\System32` | Compressed/Encrypted PECMD script packed in boot.wim. |
| PhoenixPE-UserConfig.wcz | `%OutputDir%\PhoenixPE` | Compressed/Encrypted PECMD script included on boot media (CD/USB). |
You may also choose to run AutoIt3 or PECMD scripts directly at different startup phases using the `AddAutoRun` command.
### AddAutoRun
### Example
You may also choose to run AutoIt3 or PECMD scripts directly at different startup stages using the `AddAutoRun` command.
**Example**
```
// Autorun a PECMD script during PostConfig
@@ -54,7 +58,7 @@ AddAutoRun,AfterNetwork,HideWait,"Running custom script...",myscript.au3",
## History
Prior to the PhoenixPE 2024-01-14 release, the pre-shell operations used PECMD, a command interpreter popular for use in WinPE environments written by Chinese developers Lxl1638(Li Shiting), Yonsm, and DSystem. It was formally open source, but has been closed source since 2012 when DSystem took over development. It worked well enough for simple tasks, but had a number of drawbacks, including arcane syntax, poor documentation, and a number of undocumented "features" that kept popping up an causing some serious bugs and problems with newer versions of Windows. An alternative was needed in order to accelerate development of more advanced features and move PhoenixPE to the next level.
Prior to the PhoenixPE 2024-01-14 release, the pre-shell operations used PECMD, a command interpreter popular for use in WinPE environments written by Chinese developers Lxl1638(Li Shiting), Yonsm, and DSystem. It was formally open source, but has been closed source since 2012 when DSystem took over development. It worked well enough for simple tasks, but had a number of drawbacks, including arcane syntax, limited command set, poor documentation, and a number of undocumented "features" that kept popping up an causing some serious bugs and problems with newer versions of Windows. An alternative was needed in order to accelerate development of more advanced features and move PhoenixPE to the next level.
We did not want to go the route of trying to write a PECMD clone, or follow LiveSystemPro or older Win7PE_SE projects and use closed source custom loaders such as `PEInit.exe` or `shortcuts.exe` that limited options and required writing and learning new config files. We wanted something that didn't have to be compiled and was open and easy to use so project developers and advanced users could clearly see what was going on under the hood and further contribute to the WinPE community.