title: Can I add a resource file programmatically?
body: <p>I am creating a license protector in c#.<br>I have two files ( <code>DATA.exe</code> &amp; <code>Project1.exe</code> ) when I access the Project 1 it automatically reads the file DATA.exe as array of bytes, then decrypts it and loads it in memory***.<br>In order to avoid generating the data.exe file and ship it with the protected file, I wanted to embed the DATA.exe into the Project1.exe as a Binary Resource File and call it using :</p>
  
  <pre><code>  Byte[] encryptedfilebytes = Properties.Resources.crypteddata;
  </code></pre>
  
  <p>Now, I have only one file, when I click Project1.exe it would simply extract the DATA.exe from its resource, decrypt and load it into memory. </p>
  
  <p>Here is the problem* :<br>
  The DATA.exe file is not always the same, it changes according to the input file and options selected when protecting the application. Is there some way to embed the DATA.exe file programmatically into the Project1.exe while protecting the input file we want to protect.<br></p>