diff --git a/PhoenixAPI.md b/PhoenixAPI.md index 6725f0c..4929ba3 100644 --- a/PhoenixAPI.md +++ b/PhoenixAPI.md @@ -13,12 +13,14 @@ Click on a Command below for more information. | [[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. | +| [[Binmay]] | Binary Search and Replace Tool. | | [[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. | +| [[DriveGetType]] | Get the drive type (Fixed/Removable,etc). | | [[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. | diff --git a/PhoenixAPI/Binmay.md b/PhoenixAPI/Binmay.md new file mode 100644 index 0000000..e9e516c --- /dev/null +++ b/PhoenixAPI/Binmay.md @@ -0,0 +1,47 @@ +# Binmay + +Binary Search and Replace Tool. + +This command is a wrapper for Binmay.exe and passes any arguments directly to the executable. +You are responsible for checking the return code and handling any errors. + +## Syntax + +```pebakery +Binmay,[,] +``` + +### Arguments + +| Argument | Description | +| --- | --- | +| Args | The arguments to pass to the Binmay executable. | +| WorkDir | The full path to the working directory. Default is the exe path. | + +## Return Codes + +| Variable | Description | +| --- | --- | +| #r | ExitCode provided by the Binmay application. | + +## Remarks + +Make sure to escape double-quotes, percent, etc. in Args. + +See the [Binmay documentation](https://github.com/slorelee/binmay) for more details on Binmay.exe arguments. + +## Related + +None. + +## Examples + +### Example 1 + +```pebakery + +Echo,"Patching file..." +Binmay,"-u #$q%TargetPrograms%\%ProgramFolder%\%ProgramExe%#$q -s 650078007000 -r 880078006000" +If,Not,#r,Equal,0,Halt,"Error: Failed to patch [%ProgramFile%]." + +``` diff --git a/PhoenixAPI/DriveGetType.md b/PhoenixAPI/DriveGetType.md new file mode 100644 index 0000000..7c57d4b --- /dev/null +++ b/PhoenixAPI/DriveGetType.md @@ -0,0 +1,45 @@ +# DriveGetType + +Get the drive type (Fixed/Removable,etc). + +## Syntax + +```pebakery +DriveGetType, +``` + +### Arguments + +| Argument | Description | +| --- | --- | +| Drive Letter | The drive letter to query. | + +## Return Codes + +| Token | Description | +| --- | --- | +| #r | Success returns one of the following values: | +|| Unknown | +|| Removable | +|| Fixed | +|| Network | +|| CDROM | +|| RAMDisk | + +## Remarks + +If the command fails the build will halt. + +## Related + +None. + +## Examples + +### Example 1 + +```pebakery + +DriveGetType,"C:" + +```