How can I determine what process a window belongs to?

Use Process Explorer, it allows you to identify the window and then you can check the properties of the process to figure out the command line used. This command line will help you determine what exactly has been launched, this helps to figure out where Java applications and scripts are located...

enter image description here

Just drag the icon over the window.

For a complete list of start-up applications, services and drivers; check Autoruns.