Self-Extracting Plugin

Using a self-extracting (RAR) plugin for running programs from the RAM drive

: : Introduction
: : Building a self-extracting file
: : Create configuration files

Introduction

I’m using the self-extracting (RAR) technologie to make a plugin simpler and to save lots of MB’s on my rescue disc. It’s also possible to execute this programs from a RAM drive. You can define absolute paths (B:) or relative paths (%temp%) to execute from.

Building a self-extracting file

In this example we are using Easyrecovery v6.0. Browse to the Easyrecovery v6.0 directory and select al the file that you wish to use in this new plugin. Use the right-click and [Add to Archive] from the context menu.

[SinglePic not found]

Give this new archive a fimeliare name (in this example easyrecovery_SFX.exe) and select the [Create SFX archive] and [Create solid archive] box. Select [Best] as Compression method.

[SinglePic not found]

Select the [SFX options] from the [Advanced] tab.

[SinglePic not found]

Within the [Advanced SFX options] we define the extract path, and which program will be run automatically extraction. In this example we type in the [Path to extract] box your absolute RAM drive path and folder (B:EasyRecovery) you want to extract to. In the [Run after extraction] box, we type in the name of the program you want to execute after extraction (easyrecovery.exe).

NOTE: that you can also define a relative path, for example: %temp%EasyRecovery, which will extract to wherever you have defined %temp%.

[SinglePic not found]

Select the [Hide all] and [Skip existing files] options from the [Modes] tab.

[SinglePic not found]

You cab also add an icon to the file. this give the impression in XPE dealing with the original file. Click on [text and icon] and select the proper icon in the [load SFX icon from file] option.

To replace the standard SFX icon by contained in the proposed .ico file. This file must include at least one 32×32 icon, 16 or 256 colors (or both). It is also recommended though not required to include 16×16 icons.

After this you can create the Self-Extracting file by clicking twice on [OK]. Copy the new self-extracting file to the files directory of the Easyrecovery plugin.

Create configuration files

Create a INF file in the Easyrecovery plugin directory, In this example we use a easyrecovery.inf (see example). The last two rows are for the XPE plugin.

; easyrecovery.inf
; PE Builder v3 plug-in INF file for Easy Recovery Pro 6
; Created by xpe.collewijn.info
; Windows XPE Compatible

[Version]
Signature= "$Windows NT$"

[PEBuilder]
Name="Easy Recovery Pro 6"
Enable=1
Help="easyrecovery.htm"

[WinntDirectories]
a="ProgramsEasyRecovery",2 

[SourceDisksFiles]
fileseasyrecovery_SFX.exe=a,,1 

[Append]
nu2menu.xml, easyrecovery_nu2menu.xml 

[Software.AddReg]
0x2,"SherpyaXPEinitPrograms","System ToolsEasyRecovery
 Professional","%SystemDrive%ProgramsEasyRecoveryeasyrecovery_SFX.Exe        

and your [easyrecovery_nu2menu.xml] file can hold the following configuration:

<!-- Nu2Menu entry for Easyrecovery Pro v6.0 -->
<NU2MENU>
 <MENU ID="Programs">
  <MITEM TYPE="ITEM" DISABLED="@Not(@FileExists(@GetProgramDrive()
   ProgramsEasyRecoveryEasyrecovery_SFX.exe))"
   CMD="RUN" FUNC="@GetProgramDrive()ProgramsEasyRecoveryEasyrecovery_SFX.exe">
   Easyrecovery Pro v6.0
  </MITEM>
 </MENU>
</NU2MENU>