Atom `bin` folder is not always installed

Using Windows 10, I installed Atom on the computer at work, and I find that the folder %userprofile%\AppData\Local\atom\bin\ is correctly created, complete with the apm command.

However, installing it at home, that folder didn’t exist, but there was the app-1.54.0 folder.

My home set up is not identical to the set up at work. Among other things, it’s running on a virtual machine, which otherwise works well enough, albeit a little slowly. However I certainly haven’t done anything outlandish to my setup, so it’s a fairly plain Windows 10 installation.

Then, out of desperation, after I couldn’t find any solutions, I installed it again (without uninstalling). Now, there is the bin folder, with its four files.

No doubt, there is a perfectly sane explanation for this, but I cant think of one.

In particular, how do I guarantee that the bin folder is created first time?

The reason I want to know is that I am setting up instructions for students on installing Atom, and that will include some additional setup of packages using the apm command. It works better if the command is where it’s supposed to be.

I find that this is an old problem, but there is no sign that this has been addressed.

The discussion at:

leads me to atom.exe --squirrel-install which seems to fix the problem.

In a batch file which I use to copy some profile files and install some packages I now add:

%userprofile%\AppData\Local\atom\atom.exe --squirrel-install

near the beginning.

Unfortunately, this seems to take a while, so the command isn’t yet available for the rest of the batch file. However, this is just a matter of running the batch file again.