Using the procedure, below, the RARtest.exe opens up fine with no commandline parameters, however when using the commandline parameters for the default save directory and most importantly, the -p password option, I get the following error message, that it can’t execute the program with the parameters, thinking that the parameters are part of the program name. I tried it with none, one and both commandline options and only none works.
Rartest.exe is a passworded RAR executable to hold data and document samples. This will keep the password safe from all users and the link to execute this is locked from non registered users.
I will try a few more options and will report back, otherwise, is there another way I can do this?
Thanks,
HawkeyeTX
procedure OpenRARProgram;
var
EbookPath, MyProgram: String;
begin
// Read the path to the folder that contains our ebook .exe
EbookPath := GetGlobalVar(“HEPublicationPath”, “”);
// Construct the path to the .exe file we want to launch.
MyProgram := EbookPath + “Rartest.exe -de:\rartest -pRARtest1”;
// Execute the program!
if not RunAProgram(MyProgram, “”, EbookPath, false, SW_SHOWNORMAL) then
begin
MessageBox("Unable to execute the external program : " + MyProgram, “Ebook Error”, MB_OK+MB_ICONERROR);
exit;
end;
end;