0

In winforms I already have a launcher(Launcher.exe) that just launches my main Program.exe with something like this:

Process proc = new Process ();
proc.StartInfo.FileName = kernelFile;
proc.StartInfo.WorkingDirectory = kernelPath;
proc.StartInfo.Arguments = arguments;
proc.Start ();

But it is also launchable by just clicking the main Program.exe. So my boss decided I should make my Program.exe into something that is not .exe so I could not launch it directly.

So my ways of approaching this would be:

  1. Make that executable into class library and somehow launch the .dll as a .exe.
  2. Add some kind of an argument when launching the process from launcher so the main program wouldn't start without that argument.

Any other ideas? which one should I stick with?

  • 2
    Out of curiosity, why? – Dai Dec 21 '16 at 06:04
  • Perhaps embedding your exe file is the best way to go? See this answer for how your Launcher could extract your Program.exe file, run it and then delete it. http://stackoverflow.com/questions/798655/embedding-an-external-executable-inside-a-c-sharp-program – Karl-Henrik Dec 21 '16 at 06:06
  • Well we're certificating the program. And by their rules the entry point of an application should not change ( Be the same CRC32 ). So we're "bypassing" that by adding a launcher so we could change the main Program.exe. But then they say that there's 2 ways of launching an application. Why we're only certificating the launcher one if you can perfectly launch it through Program.exe Honestly sounds dumb to me but I – JLikeThat Dec 21 '16 at 06:07
  • Karl, would that change up the CRC32 of Launcher.exe if I changed up my main Program.exe ? – JLikeThat Dec 21 '16 at 06:09

0 Answers0