UI SPY is a utility tool for finding relevant information of various desktop applications. You can view UI Automation properties and control patterns of the applications.
You can download UI SPY tool from the link given below: http://www.tucows.com/preview/502096/UI-Spy
After opening UI SPY, you will see a window with a tree like structure, and hovering to different elements on the targeted application will show its details in the SPY window as shown below:
You can use name, automation id, class name or any other unique and relevant locator to identify the element and use them in your test script.