mirror of
https://github.com/PhoenixPE/PhoenixPE.git
synced 2025-09-16 18:18:04 +02:00
Add API documentation for new commands
@@ -6,42 +6,46 @@ Click on a Command below for more information.
|
||||
|
||||
| Command | Description |
|
||||
| --- | --- |
|
||||
| [[RegLoadHives]] | Mount Source and Build registry hives. |
|
||||
| [[RegUnloadHives]] | UnMount Source and Build registry hives. |
|
||||
| [[RegCopyDriver]] | Copy the driver entries from the INSTALL.WIM driver database to the target registry driver database. |
|
||||
| [[RequireDriver]] | Copy the driver support files and driver entries from the INSTALL.WIM driver database to the target registry driver database. |
|
||||
| [[DISM]] | Execute DISM with the provided arguments. |
|
||||
| [[7z]] | Execute 7zip with the provided arguments. |
|
||||
| [[MSIExtract]] | Extract files from an .msi installer. |
|
||||
| [[Innounp]] | Execute Innounp (Inno Setup Unpacker) with the provided arguments. |
|
||||
| [[InnoCleanup]] | Cleanup extracted Inno Setup files. |
|
||||
| [[InnoExtract]] | Extract files from an Inno Setup installer. |
|
||||
| [[InnoRename]] | Rename extracted Inno Setup files. |
|
||||
| [[WixExtract]] | Extract files from an Windows Installer XML Toolset (WiX) installer. |
|
||||
| [[ConvertImage]] | Convert an image to the specified format. |
|
||||
| [[Associate]] | Associate a file extension with a program. |
|
||||
| [[SetFileACL]] | Give full control for "Everyone" on a file or directory. |
|
||||
| [[SetRegACL]] | Take ownership and grant full control for "Everyone" on a registry key. |
|
||||
| [[FileCopyEx]] | Copy a single file and it's .mui's (if they exist) from a specified directory. |
|
||||
| [[RequireFile]] | Extract a single file and it's .mui's (if they exist) from Install.wim |
|
||||
| [[RequireFileEx]] | Extract files and their .mui's (if they exist) from Install.wim |
|
||||
| [[AddAutoRun]] | Run a program when the PE Environment starts. |
|
||||
| [[AddShortcut]] | Create Shortcuts for programs in PE. |
|
||||
| [[PinShortcut]] | Pin a shortcut to the taskbar or start menu. |
|
||||
| [[AddPostProcess]] | Configure a section to process during Build Post-Process |
|
||||
| [[RunFromRam]] | Choose to redirect the programs folder to Boot.wim |
|
||||
| [[DirDeleteEx]] | Delete a directory if it exists. |
|
||||
| [[FileDeleteEx]] | Delete a file if it exists. |
|
||||
| [[AddShortcut]] | Create Shortcuts for programs in PE. |
|
||||
| [[AddStartupConfig]] | Add a free-form line of code to the startup config. |
|
||||
| [[ApplyBitMask]] | Apply a bitmask to a hex value in a binary string. |
|
||||
| [[Associate]] | Associate a file extension with a program. |
|
||||
| [[BitClear]] | Clear a specific bit in a binary string. |
|
||||
| [[BitSet]] | Set a specific bit in a binary string. |
|
||||
| [[BitToggle]] | Set/Clear a specific bit in a binary string. |
|
||||
| [[ConvertImage]] | Convert an image to the specified format. |
|
||||
| [[DirDeleteEx]] | Delete a directory if it exists. |
|
||||
| [[DISM]] | Execute DISM with the provided arguments. |
|
||||
| [[FileCopyEx]] | Copy a single file and it's .mui's (if they exist) from a specified directory. |
|
||||
| [[FileDeleteEx]] | Delete a file if it exists. |
|
||||
| [[FileSearch]] | Search for a file and return it's full path if it exists. If the file cannot be found an empty string is returned. |
|
||||
| [[GetBinaryResource]] | Extract a binary resource from an executable file. |
|
||||
| [[InnoCleanup]] | Cleanup extracted Inno Setup files. |
|
||||
| [[InnoExtract]] | Extract files from an Inno Setup installer. |
|
||||
| [[InnoRename]] | Rename extracted Inno Setup files. |
|
||||
| [[Innounp]] | Execute Innounp (Inno Setup Unpacker) with the provided arguments. |
|
||||
| [[JSONCompact]] | Compact/minify a JSON value. |
|
||||
| [[JSONDelete]] | Add a new element/text/attribute to an XML file. |
|
||||
| [[JSONPretty]] | Format and indent the JSON file for easy human reading. |
|
||||
| [[JSONRead]] | Read a JSON value. |
|
||||
| [[JSONWrite]] | Set/Modify an JSON value. |
|
||||
| [[XMLDelete]] | Delete an XML path/value. |
|
||||
| [[MSIExtract]] | Extract files from an .msi installer. |
|
||||
| [[PinShortcut]] | Pin a shortcut to the taskbar or start menu. |
|
||||
| [[RegCopyDriver]] | Copy the driver entries from the INSTALL.WIM driver database to the target registry driver database. |
|
||||
| [[RegLoadHives]] | Mount Source and Build registry hives. |
|
||||
| [[RegUnloadHives]] | UnMount Source and Build registry hives. |
|
||||
| [[RequireDriver]] | Copy the driver support files and driver entries from the INSTALL.WIM driver database to the target registry driver database. |
|
||||
| [[RequireFileEx]] | Extract files and their .mui's (if they exist) from Install.wim |
|
||||
| [[RequireFile]] | Extract a single file and it's .mui's (if they exist) from Install.wim |
|
||||
| [[RunFromRam]] | Choose to redirect the programs folder to Boot.wim |
|
||||
| [[SetFileACL]] | Give full control for "Everyone" on a file or directory. |
|
||||
| [[SetRegACL]] | Take ownership and grant full control for "Everyone" on a registry key. |
|
||||
| [[WixExtract]] | Extract files from an Windows Installer XML Toolset (WiX) installer. |
|
||||
| [[XMLAdd]] | Delete a JSON value. |
|
||||
| [[XMLDelete]] | Delete an XML path/value. |
|
||||
| [[XMLRead]] | Read an XML value. |
|
||||
| [[XMLRename]] | Rename a value in an XML file. |
|
||||
| [[XMLUpdate]] | Update the value of an existing Attribute/Element |
|
||||
|
45
PhoenixAPI/AddStartupConfig.md
Normal file
45
PhoenixAPI/AddStartupConfig.md
Normal file
@@ -0,0 +1,45 @@
|
||||
# AddStartupConfig
|
||||
|
||||
Add a free-form line of code to the startup config (PhoenixPE.au3).
|
||||
|
||||
## Syntax
|
||||
|
||||
```pebakery
|
||||
AddStartupConfig,<RunGroup>,<Code>,<Position>
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
| Argument | Description |
|
||||
| --- | --- |
|
||||
| RunGroup | One of the following: |
|
||||
|| `PreShell` - Run before the shell (ie. Explorer) is loaded. |
|
||||
|| `PostShell` - Run after the shell is loaded. |
|
||||
|| `Network` - Run during network initialization. |
|
||||
| Code | Free-from line of AutoIt3 code to be inserted. Be sure to escape quotes, etc. Use `#$x` to insert multiple lines in one statement. |
|
||||
| Position | (Optional) One of the following: |
|
||||
|| `Append` - (Default) Place the code at the end of the run group. |
|
||||
|| `Prepend` - Place the code at the start of the run group. |
|
||||
|
||||
## Return Codes
|
||||
|
||||
None.
|
||||
|
||||
## Remarks
|
||||
|
||||
None.
|
||||
|
||||
## Related
|
||||
|
||||
## Examples
|
||||
|
||||
### Example 1
|
||||
|
||||
Run a program on startup.
|
||||
|
||||
```pebakery
|
||||
|
||||
AddStartupConfig,Network,"SetSplashText(#$qStarting Network List Service...#$q)#$xRegWrite(#$qHKLM\SYSTEM\Setup#$q, #$qSystemSetupInProgress#$q, #$qREG_DWORD#$q, 0)#$xRunProgramWait(@SystemDir & #$q\Net.exe#$q, #$qStart netprofm#$q, @ScriptDir, @SW_HIDE)#$xRegWrite(#$qHKLM\SYSTEM\Setup#$q, #$qSystemSetupInProgress#$q, #$qREG_DWORD#$q, 1)"
|
||||
|
||||
```
|
||||
|
44
PhoenixAPI/FileSearch.md
Normal file
44
PhoenixAPI/FileSearch.md
Normal file
@@ -0,0 +1,44 @@
|
||||
# FileSearch
|
||||
|
||||
Search for a file and return it's full path if it exists. If the file cannot be found an empty string is returned.
|
||||
|
||||
## Syntax
|
||||
|
||||
```pebakery
|
||||
FileSearch,<Directory>,<File>
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
| Argument | Description |
|
||||
| --- | --- |
|
||||
| Directory | The directory to search recursively for the specified file. |
|
||||
| Filter | The name of the file including it's extension to search for. (Ex. MyProgram.exe). Wildcards are supported. |
|
||||
|
||||
## Return Codes
|
||||
|
||||
| Variable | Description |
|
||||
| --- | --- |
|
||||
| #r | One of the following: |
|
||||
| | Success - A pipe separated list containing the full path(s) to the file. |
|
||||
| | Fail (File not found) - An Empty String |
|
||||
|
||||
## Remarks
|
||||
|
||||
Use `List,Get` to read the value(s) returned and `List,Count` to get the number of paths returned.
|
||||
|
||||
## Related
|
||||
|
||||
## Examples
|
||||
|
||||
### Example 1
|
||||
|
||||
Search for a file called *Resources.dll* and return the first path found.
|
||||
|
||||
```pebakery
|
||||
|
||||
FileSearch,"%ProjectTemp%\%ProgramFolder%","Resources.dll"
|
||||
If,#r,Equal,"",Halt,"Failed to find [Resources.dll]: The code returned was [#r]."
|
||||
Else,List,Get,#r,1,%ResPath%
|
||||
|
||||
```
|
46
PhoenixAPI/GetBinaryResource.md
Normal file
46
PhoenixAPI/GetBinaryResource.md
Normal file
@@ -0,0 +1,46 @@
|
||||
# GetBinaryResource
|
||||
|
||||
Extract a binary resource from an executable file.
|
||||
|
||||
## Syntax
|
||||
|
||||
```pebakery
|
||||
GetBinaryResource,<Source>,<ResourceType>,<ResourceID>,<OutputPath>[,NOERR]
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
| Argument | Description |
|
||||
| --- | --- |
|
||||
| Source | The full path to the source file (.exe, .dll, .mui, .mun, .sys, etc.). |
|
||||
| ResourceType | Can be a named resource type eg. RT_RCDATA or an ordinal number prefixed with # eg. #100 |
|
||||
| ResourceID | ID of the resource to extract. eg. NTDRIVER, RC_DATA, or #1000 |
|
||||
| OutputPath | The full path where the resource will be saved. |
|
||||
| NOERR | (Optional) Do not Halt on error, just return the exit code passed by GetBinaryResource.exe |
|
||||
|
||||
## Return Codes
|
||||
|
||||
| Variable | Description |
|
||||
| --- | --- |
|
||||
| #r | One of the following: |
|
||||
| | 0 - Success |
|
||||
| | 1 - Could not load exe |
|
||||
| | 2 - Could not find resource |
|
||||
| | 3 - Could not load resource |
|
||||
| | 4 - Could not lock resource |
|
||||
| | 5 - Could not save resource to file |
|
||||
| | 99 - Syntax Error |
|
||||
|
||||
## Remarks
|
||||
|
||||
## Related
|
||||
|
||||
## Examples
|
||||
|
||||
### Example 1
|
||||
|
||||
```pebakery
|
||||
|
||||
GetBinaryResource,"#$q%TargetPrograms%\%ProgramFolder%\%ProgramExe%#$q BINRES RCDBGSYS #$q%TargetSystem32%\drivers\Dbgv.sys#$q"
|
||||
|
||||
```
|
@@ -5,7 +5,7 @@ Read a JSON value.
|
||||
## Syntax
|
||||
|
||||
```pebakery
|
||||
JSONRead,<JSONFile>,<Path>
|
||||
JSONRead,<JSONFile>,<Path>[,NOERR]
|
||||
```
|
||||
|
||||
### Arguments
|
||||
@@ -14,6 +14,7 @@ JSONRead,<JSONFile>,<Path>
|
||||
| --- | --- |
|
||||
| JSONFile | Full path to the JSON filed to read. |
|
||||
| Path | GJSON Path notation used to locate the value to read. |
|
||||
| NOERR | (Optional) Don't Halt on errors. (Use if you intend to handle errors yourself).
|
||||
|
||||
## Return Codes
|
||||
|
||||
|
43
PhoenixAPI/XMLRead.md
Normal file
43
PhoenixAPI/XMLRead.md
Normal file
@@ -0,0 +1,43 @@
|
||||
# XMLRead
|
||||
|
||||
Read an XML value.
|
||||
|
||||
## Syntax
|
||||
|
||||
```pebakery
|
||||
XMLRead,<XMLFile>,<XPath>[,NOERR]
|
||||
```
|
||||
|
||||
### Arguments
|
||||
|
||||
| Argument | Description |
|
||||
| --- | --- |
|
||||
| XMLFile | Full path to the XML filed to read. |
|
||||
| XPath | XPath (XML Path Language) query used to locate the value to read. |
|
||||
| NOERR | (Optional) Don't Halt on errors. (Use if you intend to handle errors yourself).
|
||||
|
||||
## Return Codes
|
||||
|
||||
| Token | Description |
|
||||
| --- | --- |
|
||||
| #r | Returns the value of <XPath> |
|
||||
|
||||
## Remarks
|
||||
|
||||
For more information about using XPath syntax check out this [XPath Tutorial](https://www.w3schools.com/xml/xpath_intro.asp).
|
||||
|
||||
## Related
|
||||
|
||||
[[XMLAdd]], [[XMLDelete]], [[XMLRename]], [[XMLUpdate]]
|
||||
|
||||
## Examples
|
||||
|
||||
### Example 1
|
||||
|
||||
```pebakery
|
||||
|
||||
XMLRead,"C:\Temp\Test.xml","//_:SSIDConfig/_:SSID/_:name/text()"
|
||||
Set,%Value%,#r
|
||||
Message,Return [%Value%]
|
||||
|
||||
```
|
@@ -18,4 +18,7 @@ Below is a list of Windows version and their PhoenixPE support status.
|
||||
|Windows 10 version 21H1|19043|Unstable|Partial support building from boot.wim.|
|
||||
|Windows 10 version 21H2|19044|Unstable|Partial support building from boot.wim.|
|
||||
|Windows 11 version 21H2|22000|Experimental|No Win11 explorer shell. Use WinXShell or options include explorer.exe from a Win10 host.|
|
||||
|Windows 11 version 22H2|22621|Stable|Sound only works under Administrator.|
|
||||
|Windows 11 version 22H2|22621.382|Stable||
|
||||
|Windows 11 version 22H2|22621.1702|Stable||
|
||||
|Windows 11 version 23H2v1|22621.2428|Stable||
|
||||
|Windows 11 version 23H2v2|22621.2861|Unstable|Explorer crash on boot.|
|
Reference in New Issue
Block a user