Your application can, if it does not exist, write a folder / file (with a file name based on a timestamp?).
When the application starts, always look for the file. If the file is missing, then it is the first time, do what you want and write the file.
If there is a file, then this is not the first time.
I donβt know if there is anything in the Electron API!
source share