I don't normally use Drush on Windows, but tried it and noticed that it appends drush as a kind of root directory for any action, thus breaking said action.

For example, drush dd gives:

The command could not be executed successfully (returned: 'Path/To/Composer/vendor/drush/drush/drush' is not recognized as an internal or external command, operable program or batch file. , code: 1)

The correct path is Path/To/Composer/vendor/drush/drush.

When running drush en mymodule, the debug information contains the following.

[preflight] Alias paths: drupal\site\root/drush/sites,drupal/site/root/drush/sites

drupal/site/root/sites I think makes more sense.

The error is Command pm:enable was not found.

Maybe this is a coincidence and the two are unrelated, but how does one configure Drush directories?

The Drush version is 9.5.2.

2 Answers 2


I haven't used Drush under Windows, but something tells me that the problem could be solved by by editing the path to the Drush executable, perhaps in a Windows environment variable.


I don't think you have installed Drush 9 correctly as Drush is trying to execute


Drush 9 should be installed site-locally, not globally, and be launched using Drush Launcher - see http://docs.drush.org/en/master/install/

We can't help you anymore without knowing how you installed Drupal and Drush. The recommended approach to install Drupal is using https://github.com/drupal-composer/drupal-project (which includes a site-local Drush).

PS! vendor/drush/drush/drush exists, but it is a script for Linux.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.