You can but it's not absolutely secureThe reason is the program EXE file will be accessible on the disk while the e-book is running, so a knowledgeable person would be able to grab it
What I'd suggest is
1. Include a copyright notice in the program EXE file as well as in the ebook
2. Depending on how far you want to go with security, what you could also do is have the program EXE check for (and refuse to run if) the ebook is not running. The programmer would need to put it extra code for this (he could for example scan for the E-Book's window or memory image. Another or additional idea might be to pass an extra "secret" parameter on the command line from the ebook to the EXE, and have the program check for this and refuse to run if this is not present.
For implementation
Put the program EXE in the source folder
Use HTML code like this
<A HREF="##RUN('{ebook}\programname.exe')">Run the program</A>