Run application only once per windows-session

Using this simple tip, you can block your application to be executable only once per windows sessions. To run application again, Windows must be restarted before.

We will use “atom”, which is something like global identifier. Using function GlobalFindAtom, we will try to find our application’s unique ID (we will generate a GUID using Ctrl+Shift+G shortcut). If it doesn’t exist, we will allow to run application and create “atom” using GlobalAddAtom function. And that is all.