Skip to content
This repository has been archived by the owner on Mar 3, 2023. It is now read-only.

Installer for Win 8.1 does not add atom nor apm to PATH #6478

Closed
mosbth opened this issue Apr 22, 2015 · 25 comments
Closed

Installer for Win 8.1 does not add atom nor apm to PATH #6478

mosbth opened this issue Apr 22, 2015 · 25 comments
Labels
installer needs-reproduction windows Issues that occur on Windows but not on other platforms.

Comments

@mosbth
Copy link

mosbth commented Apr 22, 2015

I've made two installations of atom on fresh Windows installations. I used the Windows installer from atom.io. For Windows 7 I got both atom and apm in the PATH so I could call the directly from cmd.exe. But on Windows 8.1 they were not in the PATH.

I expected the same behavior on Windows 7 and Windows 8.1.

Is this the intended behavior? Or am I missing something?

How should I do to get atom and apm in the PATH for Windows 8.1?

On Windows 8.1

C:\Users\Mikael>atom
'atom' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Mikael>apm
'apm' is not recognized as an internal or external command,
operable program or batch file.

C:\Users\Mikael>PATH
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\

On Windows 7

C:\Users\mos>where atom
C:\Users\mos\AppData\Local\atom\bin\atom
C:\Users\mos\AppData\Local\atom\bin\atom.cmd

C:\Users\mos>where apm
C:\Users\mos\AppData\Local\atom\bin\apm
C:\Users\mos\AppData\Local\atom\bin\apm.cmd

C:\Users\mos>PATH
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Git\cmd;C:\Users\mos\AppData\Local\atom\bin
@drozzy
Copy link

drozzy commented Apr 22, 2015

Hm.. I didn't have it added to path on Windows 7 64bit.

@50Wliu 50Wliu added windows Issues that occur on Windows but not on other platforms. installer labels Apr 22, 2015
@Psychemaster
Copy link

Odd, I've just done a fresh install on Win 8.1 and the PATH variable was updated normally.

@Leonick
Copy link

Leonick commented Apr 23, 2015

Guess I'll just add that I've installed it on two Windows 8 PCs very recently (0.192.0) and amp and atom have both worked from the command prompt.

@mosbth
Copy link
Author

mosbth commented Apr 23, 2015

I did a fresh install on Windows 8 and it worked as expected, atom and apm in PATH.

C:\Users\Mikael>PATH
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32
\WindowsPowerShell\v1.0\;C:\Users\Mikael\AppData\Local\atom\bin

C:\Users\Mikael>where apm
C:\Users\Mikael\AppData\Local\atom\bin\apm
C:\Users\Mikael\AppData\Local\atom\bin\apm.cmd

C:\Users\Mikael>PATH
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32
\WindowsPowerShell\v1.0\;C:\Users\Mikael\AppData\Local\atom\bin

C:\Users\Mikael>where apm
C:\Users\Mikael\AppData\Local\atom\bin\apm
C:\Users\Mikael\AppData\Local\atom\bin\apm.cmd

@mosbth
Copy link
Author

mosbth commented Apr 24, 2015

On the failing Windows 8.1, I looked in the the file C:\Users\Mikael\AppData\Local\atom\SquirrelSetup.log (assuming its a logfile for the installation program)

Program: Starting Squirrel Updater: --createShortcut atom.exe
ApplyReleasesImpl: About to create shortcuts for atom.exe, rootAppDir C:\Users\Mikael\AppData\Local\atom\..\atom
ApplyReleasesImpl: Creating shortcut for atom.exe => C:\Users\Mikael\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\GitHub, Inc.\Atom.lnk
ApplyReleasesImpl: About to save shortcut: C:\Users\Mikael\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\GitHub, Inc.\Atom.lnk (target C:\Users\Mikael\AppData\Local\atom\update.exe, workingDir C:\Users\Mikael\AppData\Local\atom\..\atom\app-0.194.0, args --processStart atom.exe)
ApplyReleasesImpl: Creating shortcut for atom.exe => C:\Users\Mikael\Desktop\Atom.lnk
ApplyReleasesImpl: About to save shortcut: C:\Users\Mikael\Desktop\Atom.lnk (target C:\Users\Mikael\AppData\Local\atom\update.exe, workingDir C:\Users\Mikael\AppData\Local\atom\..\atom\app-0.194.0, args --processStart atom.exe)
Program: Starting Squirrel Updater: --download https://atom.io/api/updates
Program: Fetching update information, downloading from https://atom.io/api/updates
CheckForUpdateImpl: Downloading RELEASES file from https://atom.io/api/updates
FileDownloader: Downloading url: https://atom.io/api/updates/RELEASES
Program: Starting Squirrel Updater: --processStart atom.exe
Program: Want to launch 'C:\Users\Mikael\AppData\Local\atom\app-0.194.0\atom.exe'
Program: About to launch: 'C:\Users\Mikael\AppData\Local\atom\app-0.194.0\atom.exe': 
Program: Starting Squirrel Updater: --download https://atom.io/api/updates
Program: Fetching update information, downloading from https://atom.io/api/updates
CheckForUpdateImpl: Downloading RELEASES file from https://atom.io/api/updates
FileDownloader: Downloading url: https://atom.io/api/updates/RELEASES
Program: Starting Squirrel Updater: C:\Users\Mikael\AppData\Local\atom\SquirrelSetup.log

It gave me no hint.

I searched for atom.cmd and apm.cmd.

C:\Users\Mikael\AppData\Local\atom\bin\atom.cmd
C:\Users\Mikael\AppData\Local\atom\app-0.194.0\resources\cli\atom.cmd
C:\Users\Mikael\AppData\Local\atom\app-0.194.0\resources\app\apm\bin\apm.cmd

It seems like a file or link to apm, C:\Users\Mikael\AppData\Local\atom\bin\apm.cmd is missing. This file do exists on the working Win8-installation.

So. I uninstalled Atom, rebooted my Windows 8.1 Pro 64-bit, and did another fresh install of Atom, downloaded from atom.io, rebooted and ended up with the same results.

Reproduce like this:

Do a fresh install of Windows 8.1 Pro 64-bit. Run Windows update (I did it for a couple of days...). Install Atom from atom.io. Open cmd.exe and check if atom or apm is in PATH.

I'll try the same thing, install Atom on a fresh Windows installation, using Windows 8 and Windows 7. But it will take a day or two.

@mosbth
Copy link
Author

mosbth commented Apr 24, 2015

I can reproduce the fault on a fresh installation of Windows 7 Pro SP1 64-bit (WIndows update is done, several times) using Atom 0.194.0 installer from atom.io.

There are no files in C:\Users\mos\AppData\Local\atom\bin, I expected both atom.cmd and apm.cmd (could someone confirm they should be there?).

The PATH is untouched by the installation program.

C:\Users\mos>PATH
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32
\WindowsPowerShell\v1.0\

I found two log files for SquirrelSetup.log, they gave me no hint, though the latter contains exceptions.

C:\Users\mos\AppData\Local\atom\SquirrelSetup.log

Program: Starting Squirrel Updater: --createShortcut atom.exe
ApplyReleasesImpl: About to create shortcuts for atom.exe, rootAppDir C:\Users\mos\AppData\Local\atom\..\atom
ApplyReleasesImpl: Creating shortcut for atom.exe => C:\Users\mos\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\GitHub, Inc.\Atom.lnk
ApplyReleasesImpl: About to save shortcut: C:\Users\mos\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\GitHub, Inc.\Atom.lnk (target C:\Users\mos\AppData\Local\atom\update.exe, workingDir C:\Users\mos\AppData\Local\atom\..\atom\app-0.194.0, args --processStart atom.exe)
ApplyReleasesImpl: Creating shortcut for atom.exe => C:\Users\mos\Desktop\Atom.lnk
ApplyReleasesImpl: About to save shortcut: C:\Users\mos\Desktop\Atom.lnk (target C:\Users\mos\AppData\Local\atom\update.exe, workingDir C:\Users\mos\AppData\Local\atom\..\atom\app-0.194.0, args --processStart atom.exe)
Program: Starting Squirrel Updater: --download https://atom.io/api/updates
Program: Fetching update information, downloading from https://atom.io/api/updates
CheckForUpdateImpl: Downloading RELEASES file from https://atom.io/api/updates
FileDownloader: Downloading url: https://atom.io/api/updates/RELEASES

C:\Users\mos\AppData\Local\SquirrelTemp\SquirrelSetup.log

Program: Starting Squirrel Updater: --install .
Program: Starting install, writing to C:\Users\mos\AppData\Local\SquirrelTemp
CheckForUpdateImpl: Failed to load local releases, starting from scratch: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\Users\mos\AppData\Local\atom\packages\RELEASES'.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
   at System.IO.FileStream..ctor(String path, FileMode mode, FileAccess access, FileShare share)
   at Squirrel.Utility.LoadLocalReleases(String localReleaseFile)
   at Squirrel.UpdateManager.CheckForUpdateImpl.<CheckForUpdate>d__28.MoveNext()
CheckForUpdateImpl: Reading RELEASES file from C:\Users\mos\AppData\Local\SquirrelTemp
CheckForUpdateImpl: First run or local directory is corrupt, starting from scratch
ApplyReleasesImpl: Writing files to app directory: C:\Users\mos\AppData\Local\atom\app-0.194.0
ApplyReleasesImpl: Squirrel Enabled Apps: [C:\Users\mos\AppData\Local\atom\app-0.194.0\atom.exe]
ApplyReleasesImpl: Couldn't run Squirrel hook, continuing: C:\Users\mos\AppData\Local\atom\app-0.194.0\atom.exe: System.OperationCanceledException: The operation was canceled.
   at System.Threading.CancellationToken.ThrowOperationCanceledException()
   at Squirrel.Utility.<>c__DisplayClassf.<InvokeProcessAsync>b__e()
   at System.Threading.Tasks.Task.InnerInvoke()
   at System.Threading.Tasks.Task.Execute()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Squirrel.Utility.<InvokeProcessAsync>d__11.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Squirrel.UpdateManager.ApplyReleasesImpl.<>c__DisplayClassb5.<<invokePostInstall>b__a9>d__b7.MoveNext()
ApplyReleasesImpl: Starting fixPinnedExecutables
ApplyReleasesImpl: fixPinnedExecutables: oldAppDirectories is empty, this is pointless
ApplyReleasesImpl: cleanDeadVersions: for version 0.194.0
ApplyReleasesImpl: cleanDeadVersions: exclude folder app-0.194.0

@playrobotm
Copy link

I use Windows 7 Ultimate SP1 64-bit OS and I have the same problem with same error log information in SquirrelSetup.log file. I get into this problem after I re-installed Windows 7 . I didn't have this problem before. Any suggestion to fix this problem ?

@anaisbetts
Copy link
Contributor

ApplyReleasesImpl: Couldn't run Squirrel hook, continuing: C:\Users\mos\AppData\Local\atom\app-0.194.0\atom.exe: System.OperationCanceledException: The operation was canceled.

This means atom.exe took more than 15 seconds to set up shortcuts / do other stuff (most likely it crashed or hung)

@mosbth
Copy link
Author

mosbth commented May 8, 2015

Did a clean install of Atom 0.198.0 on Windows 8 Pro. Seems to work, both atom and apm is now in path.

C:\Users\Mikael>PATH
PATH=C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32
\WindowsPowerShell\v1.0\;C:\Users\Mikael\AppData\Local\atom\bin

Perhaps its solved. I'll double check on Windows 7 and 8.1 with the latest version of atom.

@mosbth
Copy link
Author

mosbth commented May 8, 2015

Yep, it works as expected on Windows 7. Both atom and apm in PATH.

I assume its fixed, I'll skip testing it on Windows 8.1 for now.

@mosbth mosbth closed this as completed May 8, 2015
@andyleejordan
Copy link

I just ran into this. Atom 0.198.0 on Windows 8.1 Ultimate. The path(s) were not added by the installer, and what more, there were two paths I needed to add:

...\AppData\Local\atom\app-0.198.0\resources\cli for atom.cmd and
...\AppData\Local\atom\app-0.198.0\resources\app\apm\bin for apm.cmd

I do not have a bin folder in \AppData\Local\atom (unlike @mosbth).

I used AtomSetup.exe downloaded about an hour and a half ago.

@drozzy
Copy link

drozzy commented May 9, 2015

Can confirm the path is added in Windows 10 Technical Preview May 9th, 2015 :-)

@andyleejordan
Copy link

After reinstalling it worked just fine. Strange.

@andyleejordan
Copy link

The second time I ran the installer (after uninstalling mind you) it completed significantly faster than the first time. My guess is that it silently failed.

@j0rdsta
Copy link

j0rdsta commented Jun 1, 2015

It might've just been a coincidence, but I attempted to install the latest version of Atom (0.204.0) several times on my Windows 8.1 machine without it being able to install the path for apm. The second last time I installed it, however, I noticed that Bitdefender appeared to be blocking Atom. Here's the log file from Bitdefender:

Active Virus Control blocked a process.
Scan Results
File Name   Action
c:\users\jordan\appdata\local\atom\app-0.204.0\atom.exe Blocked

I then reinstalled Atom with Bitdefender temporarily disabled, and the path was able to be set successfully.

@h0nvas
Copy link

h0nvas commented Sep 16, 2015

Or you can manualy add the path.
Just open start panel and start typing "Edit environment variables for your account " and you can edit PATH in System variables.
For example C:\Users\user\AppData\Local\atom\bin\atom.cmd

@dranzerashi
Copy link

Atom 1.0 installer does not add the path for atom or apm in the system variables on windows 10 64bit.

@lukewatts
Copy link

@h0nvas you don't put files in you paths. It should be

C:\Users\{yourusername}\AppData\Local\atom\bin;

This way typing atom or apm in the commandline runs that file.

@FenrisWolfe
Copy link

I realize this is a closed thread, but I just ran into this problem and here is what I did that fixed it.

I had the same problem of not being able to run ATOM from the CLI, on my Windows box, but not on my Mac.

My solution was to completely uninstall both GIT for windows AND Atom, then reinstalling GIT bash first, then during the installation I used the third option under the "Adjusting your Path environment" which was "Use Git and optional Unix tools from the Windows Command Prompt". After that I installed Atom. So GIT and ATOM in that order.

This added both Git and optional Unix tools to the PATH.

The downside is having to reinstall all your packages which for me was not fun as I had way too many, Lol.

Hopefully this helps other users.

V/R
Fredric

@ethamitc
Copy link

So I couldnt figure out why I couldnt see any options, then I relised I was reinstalling GitHub Desktop, not Git Bash, installing Git Bash Now!

@okonomiyaki3000
Copy link
Contributor

It seems that atom updates sometimes fail to create the bin folder. I've had this problem before and I have it again with 1.24.0

@okonomiyaki3000
Copy link
Contributor

Here's simple solution that works for me. I use chocolatey to manage most of my apps, Atom among them. When this happens, I should usually be able to fix it by choco install atom --force

@ghost
Copy link

ghost commented Mar 31, 2018

I have added this location to env path where the files were present
C:\Users\user\AppData\Local\atom\app-1.25.0\resources\cli

And it works!

@okonomiyaki3000
Copy link
Contributor

@iamsrikanthgopi Sure, that will work but only until the next time. We should not need to update the path every time a new version gets released.

@lock
Copy link

lock bot commented Sep 29, 2018

This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks!

@lock lock bot locked as resolved and limited conversation to collaborators Sep 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
installer needs-reproduction windows Issues that occur on Windows but not on other platforms.
Projects
None yet
Development

No branches or pull requests