I think you have registred you app unde HKCR\*\Shell\Open...\Command, where you fill in path to you .exe. Append %1 after it and it should append full path to the item on which you have performed the righ click.