diff --git a/apps/files/appinfo/register_command.php b/apps/files/appinfo/register_command.php
new file mode 100644
index 0000000000000000000000000000000000000000..435ce0ab23f272b90cc8a5aad4d44779933d4f19
--- /dev/null
+++ b/apps/files/appinfo/register_command.php
@@ -0,0 +1,9 @@
+<?php
+/**
+ * Copyright (c) 2013 Bart Visscher <bartv@thisnet.nl>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+$application->add(new OCA\Files\Command\Scan(OC_User::getManager()));
diff --git a/console.php b/console.php
index 2f773cc6a1abfe6f76a83d7b769e659052fc3c35..30f4b729214b3e91c26012052b2404f6998a7d70 100644
--- a/console.php
+++ b/console.php
@@ -25,6 +25,11 @@ if (!OC::$CLI) {
 
 $defaults = new OC_Defaults;
 $application = new Application($defaults->getName(), \OC_Util::getVersionString());
-$application->add(new OC\Core\Command\Status);
-$application->add(new OCA\Files\Command\Scan(OC_User::getManager()));
+require_once 'core/register_command.php';
+foreach(OC_App::getEnabledApps() as $app) {
+	$file = OC_App::getAppPath($app).'/appinfo/register_command.php';
+	if(file_exists($file)) {
+		require $file;
+	}
+}
 $application->run();
diff --git a/core/register_command.php b/core/register_command.php
new file mode 100644
index 0000000000000000000000000000000000000000..1eed347b7b51f94b12442d84a15f38cdd014858a
--- /dev/null
+++ b/core/register_command.php
@@ -0,0 +1,9 @@
+<?php
+/**
+ * Copyright (c) 2013 Bart Visscher <bartv@thisnet.nl>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+
+$application->add(new OC\Core\Command\Status);