AuthorizationMBS help pls!

Hi @Christian_Schmitz,

I am looking to execute the equivalent of this SUDO command :
Shell1.Execute("sudo fsck_apfs -n -l -S -x " + “/dev/disk3s3”)
(Work in Terminal app)
but how to pass the settings with AuthozizedMBS ? I tried this:

dim params(4) As string 
params(0) = "-n"  
params(1) = "-l"    
params(2) = "S" 
params(3) = "-x"
params(4) = "Disk3s3" //Device Node (sample)

if a.SimpleNewAuthorization then
a.Execute("fsck_apfs", params, true)

Thank you very much.

I complete my request:
How to retrieve the result of the command a.Execute() (the return string equivalent to Shell1.result or Shell1.ReadAll) ?

You know that we are in the weekend of a holiday?

Try with one parameter "-nlSx /dev/disk3s3”.

Yes, excuse me. Only respond when you have availability. Not so urgent!
And to display the return message of the function (I display in a TextArea) ?

You use ReadStream function.

Ah, OK ! Thanks very much. Excuse me for the disruption.

Along with the other answers you got, I’m also noticing your parameters differ between the shell and MBS function. “-S” becomes “S” and “/dev/disk3s3” becomes “Disk3s3”.
Without even trying myself, my advice when you try other ways is to keep the same syntax for the parameters; in other words, start with what already works and modify one thing after the other until it eventually breaks.

P.S.: for me, it’s not a problem you asked in a holiday week-end.