How can I inject a file into an EXE at runtime and reference the file during program operation?

后端 未结 5 1242
时光取名叫无心
时光取名叫无心 2021-02-06 11:22

I\'d like a user to download an exe from my website, where (synchronously upon download) an XML file is injected into this application. This XML file contains a public key, and

5条回答
  •  梦谈多话
    2021-02-06 11:33

    From what he writes it seems he's gonna dynamically change the file prior to download. This really depends on the server-side language you use, And how much control you have over your server/hosting provider account.
    Say you have a download.aspx file which generates this exe files and sends for download. One thing you can do is to put the assembly's source on your server then download.aspx assembles it and send it for download. (The difficult way)
    Another way is to put the compiled assembly on server then use e.g cecil ( Programmically embed resources in a .NET assembly ) or whatever to change it then send it for download.

提交回复
热议问题