Please, I try run a .exe file that in cmd console runs in the following manner:
nameFile.exe -inf fileDriver.inf install
In the Inno Setup i have the follow:
var
command: Srtring;
Begin
command := 'nameFile.exe -inf fileDriver.inf install';
command := AddQuotes(command);
Exec(command, '', 'C:\pathOfFileName', SW_SHOWNORMAL, ewWaitUntilTerminated, ResultCode);
S:= SysErrorMessage(ResultCode);
MsgBox(S, mbInformation, MB_OK);
end;
The message show that the parameters is invalid, how can run the exe file with the parameters?
Looking at your
Exec
call, you need to pass the command parameters to the second parameter of the function call. Try to use something like this instead:The
Exec
function is declared as: