I wrote a small application using LoginItemsAE (which I downloaded from net). In that I am trying to get the list of login items into an array. Its compiling well and good. But when I am executing, I am left with -1700 error. But the same when I am debugging with XCode line by line, it works fine. I am not able to figure out what is the exact problem. Can somebody help me to overcome this problem? I am attaching the code.