Add files to exe and then extract them

后端 未结 2 1244
你的背包
你的背包 2021-01-07 12:16

i am making a windows installer , i need to put some files in my program and then extract them to some folder when program runs , lets say i am going to put 3 files in singl

相关标签:
2条回答
  • 2021-01-07 12:24

    There exist two options: (1) add files as resources, and (2) append the whole package with files to the end of your EXE and mark it in some way (with magic numbers) and then open EXE for reading and read the data. Second approach is how self-extracting ZIP or PGP archives usually work and this approach works just fine.

    0 讨论(0)
  • 2021-01-07 12:27

    Have a read here : http://support.microsoft.com/kb/319292

    This shows how to extract the resource into a Stream, you can then write this stream to disk.

    0 讨论(0)
提交回复
热议问题