First you have to call WemTool.exe with -e option from cmd or batch file to encode WEM files.
Then you can either call WemTool.exe with a batch file from inno setup or directly from the inno setup script within installation.
Example:
ISDone_Example.iss
Code:
if CurStep = ssPostInstall then
begin
ExtractTemporaryFile('WemTool.exe');
FileCopy(ExpandConstant('{tmp}\WemTool.exe'), ExpandConstant('{app}\WemTool.exe'), False);
ShellExec('open', ExpandConstant('{app}\WemTool.exe'), '-d', ExpandConstant('{app}'), SW_HIDE, ewWaitUntilTerminated, ResultCode);
DSG_Module.iss
Code:
[Files]
Source: "Include\WemTool.exe"; Flags: dontcopy
The above example will execute WemTool.exe with -d parameter after install process.
Example with batch execution:
ISDone_Example.iss
Code:
if (CurStep = ssPostInstall) then
begin
ExtractTemporaryFile('batch.bat');
FileCopy(ExpandConstant('{tmp}\batch.bat'), ExpandConstant('{app}\batch,bat'), False);
ShellExec('open', ExpandConstant('{app}\batch.bat'), '', '', SW_SHOWMINIMIZED, ewWaitUntilTerminated, ResultCode);
DSG_Module.iss
Code:
[Files]
Source: "Include\batch.bat"; Flags: dontcopy
Batch.bat
If you decide to use WemTool with batch file, you will see the actual progress of it.