-1

My Exe File is stored in Resources. Now how do i get like the path of the file to start it?

I tried something but it always didn't worked!

sticky bit
  • 36,626
  • 12
  • 31
  • 42

1 Answers1

0

Possibly you have to read its bytes/in binary form from the resource, then save it to the disk - you have to specifiy the path - and call with the Process library.

See: https://social.msdn.microsoft.com/Forums/vstudio/en-US/9ee5a7e0-91b1-4d42-aa97-d8f3d528354d/run-exe-file-as-an-embedded-resource-in-c-on-selected-folder?forum=wpf

byte[] exeBytes = Properties.Resources.OPKMR;
string exeToRun = @"C:\TEST\MyTestExe.exe";

Etc.

Run Exe file as an Embedded Resource in C#

Embedding an external executable inside a C# program and run it without creating new file

Twenkid
  • 825
  • 7
  • 15