Forum > Beginners

ExecuteProcess aborts the procedure [Solved]


Who can help me?
ExecuteProcess aborts the procedure
I am trying to start the VPN client from ShrewSoft via a button.
I read in the user name and password from an InI file.
This works quite well.
But after starting ShrewSoft the procedure aborts.
Although I have searched a lot, I cannot find the error.

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---procedure TForm1.Button1Click(Sender: TObject);begin  ShowMessage('Test1');    ExecuteProcess('C:\Program Files\ShrewSoft\VPN Client\ipsecc.exe','-r ' + VAccessName + ' -u ' + VUserName + ' -p ' + VPasswort + ' -a');                       !! anything below this will be cancelled !!   ShowMessage('Test2'); end;   

It does not abort/cancel.

ExecuteProcess will start your program and wait for it to close. The next line in your code will be executed after your external program ends/closes.

EDIT: for more info about the possibilities, take a look here:

Great  ... thank you.
I did not know that.
I have now taken TProcess, so it works.
LillaCW  ;D

Sorry ...
How can I mark the problem as solved?


--- Quote from: lillaCW on May 03, 2022, 10:35:00 am ---Sorry ...
How can I mark the problem as solved?

--- End quote ---

Just edit the subject line of your original posting and put
--- Code: ---[Solved]
--- End code ---
at the start.

Crude but effective :-)



[0] Message Index

Go to full version