Skip to content

Comment on Code that will only execute once

Comments

exe's can store their own resources and that includes binary files.

Store a child exe within a parent exe.

When parent exe is run first, it should extract child exe, run it, do whetever it wants and quit.

Child exe's job is to see if parent exe has finished execution. Can be done by searching for windown handle or string.

When parent exe is no longer running, child exe should delete parent and quit.

Satisfies the requirement that parent exe's code will only run once if there is only one distribtion of exe.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.