I want to register an EXE file as OLE server with Inno Setup.
When I use my EXE file path with Regserver parameter in cmd, everything is correct.
But when I use the regserver flag in Inno Setup like this:
Source: "{src}\App\MyApp.exe"; DestDir: "{app}"; Flags: external regserver
I got this error
Unable to register the DLL/OCX: Regsvr32 failed with exit code 0x4.
What should I do?
The
regserverflag is for DLL/OCX files only. There's no standard way to register EXE files, so it cannot be handled natively by Inno Setup, the same way you cannot useregsvr32with an EXE file.If your EXE file has a custom command-line parameter for the registration, use it in Inno Setup in the
Runsection: