Thread: DiskSpan GUI
View Single Post
  #8  
Old 11-01-2026, 05:38
KaktoR's Avatar
KaktoR KaktoR is offline
Lame User
 
Join Date: Jan 2012
Location: From outer space
Posts: 4,689
Thanks: 1,106
Thanked 7,336 Times in 2,838 Posts
KaktoR is on a distinguished road
First you have to call WemTool.exe with -e option from cmd or batch file to encode WEM files.
Code:
WemTool.exe -e
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
Code:
WemTool.exe -d
If you decide to use WemTool with batch file, you will see the actual progress of it.
Attached Files
File Type: 7z test.7z (22.73 MB, 6 views)
__________________
Haters gonna hate

Last edited by KaktoR; 11-01-2026 at 05:47.
Reply With Quote
The Following User Says Thank You to KaktoR For This Useful Post:
LILU (11-01-2026)