My app has a helper app which should quit if the main app is moved to the trash. How do I do that?
App.ExecutableFile.Parent.Parent.Parent does not change if the app is moved to the trash.
The I tried to use ProcessMBS but this grabbed some random process:
dim AppFolderitemFromProcess as FolderItem
dim theProcesses as processMBS
dim myCode as string = app.ExecutableFile.Parent.Parent.Parent.getBundleID
theProcesses = new processMBS
theProcesses.GetFirstProcess
do
if theProcesses.BundleID = myCode then
AppFolderitemFromProcess = theProcesses.Path
exit do
end if
loop Until not theProcesses.GetNextProcess
The result was /usr/sbin/universalaccessd which doesn’t make any sense at all.
Any ideas?