Searching for this myself I see this comes up quite a bit and it can be expensive. I may have posted before on how to do this but I now use something called NullSoft Scriptable Installer. Basically, you write out some easy code, and if you reading this you probably understand how to code, and then NullSoft creates an Installer for you.
I know what you are thinking....I don't want to install it....or maybe you do....or maybe you need both like I did...I wanted both an installer and an exe file. It's possible with NullSoft and it's free.
The details are on their sourceforge page here. Hope this helps.