How can I make my .NET application erase itself?

前端 未结 11 692
梦如初夏
梦如初夏 2020-12-08 10:37

How can I make my C# app erase itself (self-destruct)? Here\'s two ways that I think might work:

  • Supply another program that deletes the main program. How is t
11条回答
  •  遥遥无期
    2020-12-08 11:11

    There's a MoveFileEx API, which, when given a MOVEFILE_DELAY_UNTIL_REBOOT flag, will delete specified file on next system startup.

提交回复
热议问题