Hello,

I have this shell command that I want to perform in a UI application:
sudo newfs_udf -b 2048 /dev/rdisk5

By trials and errors, here's what I have currently, which doesn't work:
auth=new AuthorizationMBS
auitse=new AuthorizationItemSetMBS
auit=new AuthorizationItemMBS
auit.Name="com.amug.MyUtilities.CreateUDFDisk"
auitse.Append auit

Auth.KeepRights=True
if auth.NewAuthorization(nil,0) then
  auth.Authorize(auitse,3)
  if auth.LastError=0 then
    disk="/dev/r"+dname 'dname being like "disk5"
    auth.Execute 
"/System/Library/Filesystems/udf.fs/Contents/Resources/newfs_udf",array("-b 
2048",disk)
    MsgBox str(Auth.LastError)
  end if
end if

All the “if” statements behave as expected and Auth.LastError shows 0, but yet, 
nothing happens. I don't seem to find a way to get the error code returned by 
the called command (all error properties I can find in the used objects are 
about the authentication itself).

If I copy/paste the executable path to the terminal, it's recognised (I get the 
help screen), so the path isn't the problem. I also tried using only the 
executable name, but I got the result “not found”.

Any idea what's wrong?
_______________________________________________
mbsplugins@monkeybreadsoftware.info mailing list
%(list_address)s
https://ml-cgn08.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info

Reply via email to