diff --git a/PhoenixAPI.md b/PhoenixAPI.md index 402021b..dad9dee 100644 --- a/PhoenixAPI.md +++ b/PhoenixAPI.md @@ -23,6 +23,7 @@ Click on a Command below for more information. | [[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. | +| [[GetStringResource]] | Extract a string 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. | diff --git a/PhoenixAPI/GetBinaryResource.md b/PhoenixAPI/GetBinaryResource.md index 78ae887..a44abe6 100644 --- a/PhoenixAPI/GetBinaryResource.md +++ b/PhoenixAPI/GetBinaryResource.md @@ -13,8 +13,8 @@ GetBinaryResource,,,,[,NOERR] | 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 | +| 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 | @@ -41,6 +41,6 @@ GetBinaryResource,,,,[,NOERR] ```pebakery -GetBinaryResource,"#$q%TargetPrograms%\%ProgramFolder%\%ProgramExe%#$q BINRES RCDBGSYS #$q%TargetSystem32%\drivers\Dbgv.sys#$q" +GetBinaryResource,"%TargetPrograms%\%ProgramFolder%\%ProgramExe","BINRES","RCDBGSYS","%TargetSystem32%\drivers\Dbgv.sys" ``` \ No newline at end of file diff --git a/PhoenixAPI/GetStringResource.md b/PhoenixAPI/GetStringResource.md new file mode 100644 index 0000000..540bbfd --- /dev/null +++ b/PhoenixAPI/GetStringResource.md @@ -0,0 +1,44 @@ +# GetStringResource + +Extract a string resource from an executable file. + +## Syntax + +```pebakery +GetStringResource,,[,NOERR] +``` + +### Arguments + +| Argument | Description | +| --- | --- | +| Source | The full path to the binary containing the string resource (.exe, .dll, .mui, .mun, .sys, etc.). | +| StringID | ID of the string resource to extract. eg. `1000` | +| NOERR | (Optional) Do not Halt on error, just return the exit code passed by GeStringResource.exe | + +## Return Codes + +| Variable | Description | +| --- | --- | +| #r | One of the following: | +| | 0 - Success | +| | 1 - Could not load exe | +| | 2 - Could not load string | +| | 3 - Could not create .ini file | +| | 4 - Could not write string | +| | 99 - Syntax Error | + +## Remarks + +## Related + +## Examples + +### Example 1 + +```pebakery + +GetStringResource,"%TargetPrograms%\%ProgramFolder%\%ProgramExe",64800 +Echo,#r + +``` \ No newline at end of file