diskutil info and sandbox


executing the code below, in a normal app I get the expected result; but when the app is sandboxed, then the shell does not execute.
Indeed, uncommenting the last line (//msgbox), I get this message:

“Unable to start the diskmanagment framework”

BTW: executing other commands (list etc.) works all right also in sandboxed app.
I tried also adding SecurityScopeBookmarks, but the shell still fails.

May be AppWrapper may have a specific entitlement to add, but I do not have a clue where to look at.

Suggestions welcome. Thanks.

Dim theShell As New Shell
theShell.Execute "diskutil info " + f.ShellPath
dim mResult as String = theShell.Result
//msgbox mResult >>> “Unable to start…”

Two possibilities that I can think off.

  1. You’re simply not allowed to use it from a Sandboxed application.
  2. You might need to call it via NSTask, to pass your application’s security credentials down the chain.

I’ll try #2 and see what happens. Thank you.