     deleteFromRegistry directoryKeyPath, ->
       deleteFromRegistry(backgroundKeyPath, callback)
 
+# Add apm and atom.exe to the PATH
+#
+# This is done by adding .cmd shims to the root bin folder in the Atom
+# install directory that point to the newly installed versions inside
+# the versioned app directories.
 updatePath = (callback) ->
   installCommands = (callback) ->
     atomCommandPath = path.join(binFolder, 'atom.cmd')

spawnUpdate = (args, callback) ->
  spawn(updateDotExe, args, callback)

installContextMenu = (callback) ->
  addToRegistry = (args, callback) ->
    args.unshift('add')

    installMenu directoryKeyPath, ->
      installMenu(backgroundKeyPath, callback)

# Uninstall the Open with Atom explorer context menu items via the registry.
uninstallContextMenu = (callback) ->
  deleteFromRegistry = (keyPath, callback) ->
    spawnReg(['delete', keyPath, '/f'], callback)
