title: How to protect my EXE resources?
body: <p>My problem is that i wanna include EXE file with my C# project as a resource  and i found the method below on the internet and it works perfectly except that after i run it ,The EXE file gets extracted to the hard drive and i wanna keep it hidden from the person who will run my C# software , I used  File.Delete() to get ride of the file when its closed but it can be copied to other places on the hard drive after you start it from the C# project , So is there anyway to protect the EXE file from getting copied? Like locking it or at least hiding it? Also if its possible to read the file without the need to extract  it that would be great , I would appreciate it if you guys be specific because I'm new to C# programming , Thanks .</p>
  
  <pre><code>byte[] exeBytes = Properties.Resources.MyTestExe;
  string exeToRun = @"Resources.MyTestExe.exe";
  
  using (FileStream exeFile = new FileStream(exeToRun, FileMode.CreateNew))
  {
      exeFile.Write(exeBytes, 0, exeBytes.Length);
  }
  
  using (Process exeProcess = Process.Start(exeToRun))
  {
      exeProcess.WaitForExit();
      File.Delete(exeToRun);
  }
  </code></pre>