I want to detect whether the electron application runs for the first time after installation or not. Can someone help me with this?
Check if a file exists, if not write to it, then call your first run function.
Not sure if it’s best-practice, but the way I’ve done it is the same way that @discordchris suggested. Once installation finishes, the app has created some new files. Then use
fs.stat() to check if one or more of the install files exist.