0

I have a system that downloads a file from my webserver as a .DLL. I would like to execute said DLL as an EXE file. Is there a way to start it directly as an EXE in C# or should I change it to an EXE and then run it.

EDIT: I am running Windows 10

morsotom
  • 11
  • 1

1 Answers1

0

solved it with this:
File.Move(DestinationPath, Path.ChangeExtension(DestinationPath, ".exe"));

morsotom
  • 11
  • 1
  • Not what I was originally going for but it works. – morsotom Oct 28 '21 at 16:06
  • 1
    Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Milad Dastan Zand Oct 28 '21 at 16:08